--- parser3/src/classes/op.C 2021/11/09 14:45:06 1.261 +++ parser3/src/classes/op.C 2024/09/13 04:01:22 1.263 @@ -1,8 +1,8 @@ /** @file Parser: parser @b operators. - Copyright (c) 2001-2020 Art. Lebedev Studio (http://www.artlebedev.com) - Author: Alexandr Petrosian (http://paf.design.ru) + Copyright (c) 2001-2023 Art. Lebedev Studio (http://www.artlebedev.com) + Authors: Konstantin Morshnev , Alexandr Petrosian */ #include "classes.h" @@ -18,7 +18,7 @@ #include "pa_vclass.h" #include "pa_charset.h" -volatile const char * IDENT_OP_C="$Id: op.C,v 1.261 2021/11/09 14:45:06 moko Exp $"; +volatile const char * IDENT_OP_C="$Id: op.C,v 1.263 2024/09/13 04:01:22 moko Exp $"; // defines @@ -729,8 +729,8 @@ static Cache_get_result cache_get(Reques static time_t as_expires(Request& r, MethodParams& params, int index, time_t now) { time_t result; - if(Value* vdate=params[index].as(VDATE_TYPE)) - result=(time_t)(static_cast(vdate)->get_time()); + if(VDate* vdate=dynamic_cast(¶ms[index])) + result=vdate->get_time(); else result=now+(time_t)params.as_double(index, "lifespan must be date or number", r);