interesting error

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

interesting error

French, Shelane
This was an interesting error to get:

No tag, type or constant was defined under the name "valid_date" with arguments: array: (11/29/2017 19:49:51) (-9948)

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: interesting error

stevepiercy
Why are you passing an array instead of a string as an argument?

--steve


On 11/30/17 at 3:40 PM, [hidden email] (French, Shelane) pronounced:

> This was an interesting error to get:
>
> No tag, type or constant was defined under the name "valid_date" with arguments: array:
> (11/29/2017 19:49:51) (-9948)
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>   the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy              Website Builder              Eugene, OR
<[hidden email]>               <http://www.stevepiercy.com/>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: interesting error

French, Shelane
That code has been in place for years. I will double check, but I didn't
think so. Good point though.

On 11/30/17, 8:43 AM, "[hidden email] on behalf of
Steve Piercy - Website Builder" <[hidden email] on
behalf of [hidden email]> wrote:

>Why are you passing an array instead of a string as an argument?
>
>--steve
>
>
>On 11/30/17 at 3:40 PM, [hidden email] (French, Shelane) pronounced:
>
>> This was an interesting error to get:
>>
>> No tag, type or constant was defined under the name "valid_date" with
>>arguments: array:
>> (11/29/2017 19:49:51) (-9948)
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>>   the mailing list Lasso [hidden email]
>> Official list archives available at
>>http://secure-web.cisco.com/1_-Q9BhD28TYMJk4JXYNJ7EXu-9TZk2RP9NXp9kwlDAW6
>>e1Jaoh3pOkvg9Sf_JHz1n1UGxXYyz_fACaMYfKnmSpaC2cyYwmeWEHJkUHqGj3kj7vIVXjV7h
>>Om3uaGO2qABRA5C0szAnewrhN0SiBo6eHeGaWQsxwR6o1VuW_PNwTK_fLNsHEbHTFvb1t8u7Y
>>UBBWWEYNv6oCPltY92Vp39QUX36txCiFeGS7VL-6_fD81Fr0AbM_kuweZ7MM1A7RtBTrLImNP
>>AmU2Kjw4WvWOm5MxHvNyBl5ZU3Jy7GHhLGukySTovLHjuyhWdL-tAlpbjGL1LtL8dwSbCuuLj
>>JV4GY4R2vXUFzEBmOMdA0Z5WYiS0SVo-v2Kt8XPLMpcPktU9/http%3A%2F%2Fwww.lassota
>>lk.com%0A%3E%20To%20unsubscribe%2C%20E-mail%20to%3A%20%3CLasso-unsubscrib
>>e%40lists.lassosoft.com>
>> Send administrative queries to  <[hidden email]>
>
>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>Steve Piercy              Website Builder              Eugene, OR
><[hidden email]>               <http://www.stevepiercy.com/>
>
>
>#############################################################
>
>This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
>Official list archives available at
>http://secure-web.cisco.com/1MIHE0N4gzSx5y5cPcQNvjviH2RlioeS8ZEhyiuLvWA-Ul
>vgvpbFzsKKU8xXvtKb8w6J-HX52zc3qI94y4kKFWmbWJNbTwN0ZQAB0G47WIadIAYqdABuxmSr
>I0X5jRk7cZ9C443j5xr83PfvOhOtMsLBHfP1OuTvOjsoisQ7KD7Ngnz4-P6A2bYCnj786Fop4L
>Pim1rpENNhy0yEa2MVTNupx4s7Urx21ovjeUC2Fyo2NNXmoMYMLROi0RhfQhpezc0poALJiS4V
>h5LhS6qQib3qlMZyknMH_wn1FTj00b591mxH35LZdRX3nu3P4CjDAgyrKZGpMaWJyp_13Cpn3k
>cZky9cV82-jU5iJUyYR5wVAWUkDu8OPVU3ipj9WuL2p/http%3A%2F%2Fwww.lassotalk.com
>%0ATo%20unsubscribe%2C%20E-mail%20to%3A%20%3CLasso-unsubscribe%40lists.las
>sosoft.com>
>Send administrative queries to  <[hidden email]>
>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: interesting error

Da'oud Rashid
Unless I’m missing something, I believe “arguments" is always an array, so that’s probably not the issue.

[undefined_tag('random string’)]

Result: No tag, type or constant was defined under the name "undefined_tag" with arguments: array: (random string)

If you haven’t tried this already, try restarting Lasso. Also, what version of Lasso are you using?

Best regards,
Da'oud

> On 30 Nov 2017, at 17:00, French, Shelane <[hidden email]> wrote:
>
> That code has been in place for years. I will double check, but I didn't
> think so. Good point though.
>
> On 11/30/17, 8:43 AM, "[hidden email] on behalf of
> Steve Piercy - Website Builder" <[hidden email] on
> behalf of [hidden email]> wrote:
>
>> Why are you passing an array instead of a string as an argument?
>>
>> --steve
>>
>>
>> On 11/30/17 at 3:40 PM, [hidden email] (French, Shelane) pronounced:
>>
>>> This was an interesting error to get:
>>>
>>> No tag, type or constant was defined under the name "valid_date" with
>>> arguments: array:
>>> (11/29/2017 19:49:51) (-9948)
>>>
>>> #############################################################
>>>
>>> This message is sent to you because you are subscribed to
>>>  the mailing list Lasso [hidden email]
>>> Official list archives available at
>>> http://secure-web.cisco.com/1_-Q9BhD28TYMJk4JXYNJ7EXu-9TZk2RP9NXp9kwlDAW6
>>> e1Jaoh3pOkvg9Sf_JHz1n1UGxXYyz_fACaMYfKnmSpaC2cyYwmeWEHJkUHqGj3kj7vIVXjV7h
>>> Om3uaGO2qABRA5C0szAnewrhN0SiBo6eHeGaWQsxwR6o1VuW_PNwTK_fLNsHEbHTFvb1t8u7Y
>>> UBBWWEYNv6oCPltY92Vp39QUX36txCiFeGS7VL-6_fD81Fr0AbM_kuweZ7MM1A7RtBTrLImNP
>>> AmU2Kjw4WvWOm5MxHvNyBl5ZU3Jy7GHhLGukySTovLHjuyhWdL-tAlpbjGL1LtL8dwSbCuuLj
>>> JV4GY4R2vXUFzEBmOMdA0Z5WYiS0SVo-v2Kt8XPLMpcPktU9/http%3A%2F%2Fwww.lassota
>>> lk.com%0A%3E%20To%20unsubscribe%2C%20E-mail%20to%3A%20%3CLasso-unsubscrib
>>> e%40lists.lassosoft.com>
>>> Send administrative queries to  <[hidden email]>
>>
>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> Steve Piercy              Website Builder              Eugene, OR
>> <[hidden email]>               <http://www.stevepiercy.com/>
>>
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at
>> http://secure-web.cisco.com/1MIHE0N4gzSx5y5cPcQNvjviH2RlioeS8ZEhyiuLvWA-Ul
>> vgvpbFzsKKU8xXvtKb8w6J-HX52zc3qI94y4kKFWmbWJNbTwN0ZQAB0G47WIadIAYqdABuxmSr
>> I0X5jRk7cZ9C443j5xr83PfvOhOtMsLBHfP1OuTvOjsoisQ7KD7Ngnz4-P6A2bYCnj786Fop4L
>> Pim1rpENNhy0yEa2MVTNupx4s7Urx21ovjeUC2Fyo2NNXmoMYMLROi0RhfQhpezc0poALJiS4V
>> h5LhS6qQib3qlMZyknMH_wn1FTj00b591mxH35LZdRX3nu3P4CjDAgyrKZGpMaWJyp_13Cpn3k
>> cZky9cV82-jU5iJUyYR5wVAWUkDu8OPVU3ipj9WuL2p/http%3A%2F%2Fwww.lassotalk.com
>> %0ATo%20unsubscribe%2C%20E-mail%20to%3A%20%3CLasso-unsubscribe%40lists.las
>> sosoft.com>
>> Send administrative queries to  <[hidden email]>
>>
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: interesting error

stevepiercy
In reply to this post by French, Shelane
Sure, code doesn't write itself, but the values passed into it
have a likelihood of being not what one would expect.

--steve


On 11/30/17 at 5:00 PM, [hidden email] (French, Shelane) pronounced:

>That code has been in place for years. I will double check, but I didn't
>think so. Good point though.
>
>On 11/30/17, 8:43 AM, "[hidden email] on behalf of
>Steve Piercy - Website Builder" <[hidden email] on
>behalf of [hidden email]> wrote:
>
>>Why are you passing an array instead of a string as an argument?
>>
>>--steve
>>
>>
>>On 11/30/17 at 3:40 PM, [hidden email] (French, Shelane) pronounced:
>>
>>> This was an interesting error to get:
>>>   No tag, type or constant was defined under the name
>>>"valid_date" with
>>>arguments: array:
>>> (11/29/2017 19:49:51) (-9948)
>>>   #############################################################
>>>   This message is sent to you because you are subscribed to
>>>   the mailing list Lasso [hidden email]
>>> Official list archives available at
>>>http://secure-web.cisco.com/1_-Q9BhD28TYMJk4JXYNJ7EXu-9TZk2RP9NXp9kwlDAW6
>>>e1Jaoh3pOkvg9Sf_JHz1n1UGxXYyz_fACaMYfKnmSpaC2cyYwmeWEHJkUHqGj3kj7vIVXjV7h
>>>Om3uaGO2qABRA5C0szAnewrhN0SiBo6eHeGaWQsxwR6o1VuW_PNwTK_fLNsHEbHTFvb1t8u7Y
>>>UBBWWEYNv6oCPltY92Vp39QUX36txCiFeGS7VL-6_fD81Fr0AbM_kuweZ7MM1A7RtBTrLImNP
>>>AmU2Kjw4WvWOm5MxHvNyBl5ZU3Jy7GHhLGukySTovLHjuyhWdL-tAlpbjGL1LtL8dwSbCuuLj
>>>JV4GY4R2vXUFzEBmOMdA0Z5WYiS0SVo-v2Kt8XPLMpcPktU9/http%3A%2F%2Fwww.lassota
>>>lk.com%0A%3E%20To%20unsubscribe%2C%20E-mail%20to%3A%20%3CLasso-unsubscrib
>>>e%40lists.lassosoft.com>
>>> Send administrative queries to  <[hidden email]>
>>
>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>Steve Piercy              Website Builder              Eugene, OR
>><[hidden email]>               <http://www.stevepiercy.com/>
>>
>>
>>#############################################################
>>
>>This message is sent to you because you are subscribed to
>>the mailing list Lasso [hidden email]
>>Official list archives available at
>>http://secure-web.cisco.com/1MIHE0N4gzSx5y5cPcQNvjviH2RlioeS8ZEhyiuLvWA-Ul
>>vgvpbFzsKKU8xXvtKb8w6J-HX52zc3qI94y4kKFWmbWJNbTwN0ZQAB0G47WIadIAYqdABuxmSr
>>I0X5jRk7cZ9C443j5xr83PfvOhOtMsLBHfP1OuTvOjsoisQ7KD7Ngnz4-P6A2bYCnj786Fop4L
>>Pim1rpENNhy0yEa2MVTNupx4s7Urx21ovjeUC2Fyo2NNXmoMYMLROi0RhfQhpezc0poALJiS4V
>>h5LhS6qQib3qlMZyknMH_wn1FTj00b591mxH35LZdRX3nu3P4CjDAgyrKZGpMaWJyp_13Cpn3k
>>cZky9cV82-jU5iJUyYR5wVAWUkDu8OPVU3ipj9WuL2p/http%3A%2F%2Fwww.lassotalk.com
>>%0ATo%20unsubscribe%2C%20E-mail%20to%3A%20%3CLasso-unsubscribe%40lists.las
>>sosoft.com>
>>Send administrative queries to  <[hidden email]>
>>
>
>
>#############################################################
>
>This message is sent to you because you are subscribed to
>the mailing list Lasso [hidden email]
>Official list archives available at http://www.lassotalk.com
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy              Website Builder              Eugene, OR
<[hidden email]>               <http://www.stevepiercy.com/>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: interesting error

French, Shelane
The only place that tag is used on my site goes like this:

---
if(!valid_date(field('received')));
        #sendemail = true;
                                                else(date(field('received'))->difference(date, -month) >=6);
        #sendemail = true;
                                                /if;
---


That is where the field received is a mysql date field.

I say it's an odd error because valid_date is most certainly a defined tag
as it is part of the Lasso core language.

On 11/30/17, 10:12 AM, "[hidden email] on behalf of
Steve Piercy - Website Builder" <[hidden email] on
behalf of [hidden email]> wrote:

>Sure, code doesn't write itself, but the values passed into it
>have a likelihood of being not what one would expect.
>
>--steve
>
>
>On 11/30/17 at 5:00 PM, [hidden email] (French, Shelane) pronounced:
>
>>That code has been in place for years. I will double check, but I didn't
>>think so. Good point though.
>>
>>On 11/30/17, 8:43 AM, "[hidden email] on behalf of
>>Steve Piercy - Website Builder" <[hidden email] on
>>behalf of [hidden email]> wrote:
>>
>>>Why are you passing an array instead of a string as an argument?
>>>
>>>--steve
>>>
>>>
>>>On 11/30/17 at 3:40 PM, [hidden email] (French, Shelane) pronounced:
>>>
>>>> This was an interesting error to get:
>>>>   No tag, type or constant was defined under the name
>>>>"valid_date" with
>>>>arguments: array:
>>>> (11/29/2017 19:49:51) (-9948)
>>>>   #############################################################
>>>>   This message is sent to you because you are subscribed to
>>>>   the mailing list Lasso [hidden email]
>>>> Official list archives available at
>>>>http://secure-web.cisco.com/1_-Q9BhD28TYMJk4JXYNJ7EXu-9TZk2RP9NXp9kwlDA
>>>>W6
>>>>e1Jaoh3pOkvg9Sf_JHz1n1UGxXYyz_fACaMYfKnmSpaC2cyYwmeWEHJkUHqGj3kj7vIVXjV
>>>>7h
>>>>Om3uaGO2qABRA5C0szAnewrhN0SiBo6eHeGaWQsxwR6o1VuW_PNwTK_fLNsHEbHTFvb1t8u
>>>>7Y
>>>>UBBWWEYNv6oCPltY92Vp39QUX36txCiFeGS7VL-6_fD81Fr0AbM_kuweZ7MM1A7RtBTrLIm
>>>>NP
>>>>AmU2Kjw4WvWOm5MxHvNyBl5ZU3Jy7GHhLGukySTovLHjuyhWdL-tAlpbjGL1LtL8dwSbCuu
>>>>Lj
>>>>JV4GY4R2vXUFzEBmOMdA0Z5WYiS0SVo-v2Kt8XPLMpcPktU9/http%3A%2F%2Fwww.lasso
>>>>ta
>>>>lk.com%0A%3E%20To%20unsubscribe%2C%20E-mail%20to%3A%20%3CLasso-unsubscr
>>>>ib
>>>>e%40lists.lassosoft.com>
>>>> Send administrative queries to  <[hidden email]>
>>>
>>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>Steve Piercy              Website Builder              Eugene, OR
>>><[hidden email]>               <http://www.stevepiercy.com/>
>>>
>>>
>>>#############################################################
>>>
>>>This message is sent to you because you are subscribed to
>>>the mailing list Lasso [hidden email]
>>>Official list archives available at
>>>http://secure-web.cisco.com/1MIHE0N4gzSx5y5cPcQNvjviH2RlioeS8ZEhyiuLvWA-
>>>Ul
>>>vgvpbFzsKKU8xXvtKb8w6J-HX52zc3qI94y4kKFWmbWJNbTwN0ZQAB0G47WIadIAYqdABuxm
>>>Sr
>>>I0X5jRk7cZ9C443j5xr83PfvOhOtMsLBHfP1OuTvOjsoisQ7KD7Ngnz4-P6A2bYCnj786Fop
>>>4L
>>>Pim1rpENNhy0yEa2MVTNupx4s7Urx21ovjeUC2Fyo2NNXmoMYMLROi0RhfQhpezc0poALJiS
>>>4V
>>>h5LhS6qQib3qlMZyknMH_wn1FTj00b591mxH35LZdRX3nu3P4CjDAgyrKZGpMaWJyp_13Cpn
>>>3k
>>>cZky9cV82-jU5iJUyYR5wVAWUkDu8OPVU3ipj9WuL2p/http%3A%2F%2Fwww.lassotalk.c
>>>om
>>>%0ATo%20unsubscribe%2C%20E-mail%20to%3A%20%3CLasso-unsubscribe%40lists.l
>>>as
>>>sosoft.com>
>>>Send administrative queries to  <[hidden email]>
>>>
>>
>>
>>#############################################################
>>
>>This message is sent to you because you are subscribed to
>>the mailing list Lasso [hidden email]
>>Official list archives available at
>>http://secure-web.cisco.com/15Q_1bhgVai6zYzERowRjFc6YSJ5ir508dNzGjlhHdxga
>>ZRn0-8Jm47386wKFH2mt5C8NVrGK5nJ4gWNe5QtBF6op3jDaOWeMaa8T17lIrpU9vWZBtY1bt
>>Tf4pzJfDwzC3g5wbqs6kkjwavkCRPWISwyXyPnpHzxAKadmf4g5NWfF7T_uiEZFogGU2f5iwj
>>BW0sZOvZHyLzcVNNBTy3YUGpF2DCQ1UAJf0dvAqvT3PxdQ0JN6HPwsy9sUbs2scUs_XRjyB_C
>>UyVmM0gXRz2cru0zETo4xgvnkKimrxcZmWxlSeMC4tYY0gdz190KQjpUPFGTFhvl_mnbAdqF4
>>YYEHdM2TBxrVKmbVK92UtHB0_y9L0fp48Xvwc1p1Jv1IyWED2qROQPRmWy7Sdk-x-2IohA/ht
>>tp%3A%2F%2Fwww.lassotalk.com%0A%3ETo%20unsubscribe%2C%20E-mail%20to%3A%20
>>%3CLasso-unsubscribe%40lists.lassosoft.com>
>>Send administrative queries to  <[hidden email]>
>
>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>Steve Piercy              Website Builder              Eugene, OR
><[hidden email]>               <http://www.stevepiercy.com/>
>
>
>#############################################################
>
>This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
>Official list archives available at
>http://secure-web.cisco.com/1UgnPlgaFcjj_6O4LRWoqKUliH0ee5G8i11-6nVKkXFVF1
>yyKremgsrjmTENZ8gB1A1JMfLfXQHL2Zlm1r27SejxPoViAqm6wQQSlGoMJFRMczKEc11vfrvZ
>1dR_j3J8bcVs3jeaClkdTMUFBJ5M7qkAxvbWRwQ9JCZ02W9x8OJSUhedNqHM7s7FqOtVftd-eq
>vux09dkVJw2dVPWToxJz4H4bAjqfZ5NLDD4TbLsCfvbArs_4YUMnTETcGp2IbRfxjTvQdhZmdF
>HLuaCsP6RZ_8YJ5WQGYSX83gcKnjZwFGw7UthdieOYWs1JhNRtOxWzF7C1v2ozDZISVmTRk9A9
>OHqxQQkpFYdRkTnUJ93XQyHXHIr2_0zRHOoERkAR7egVd0ZGHV1texjyupLbb_sCg/http%3A%
>2F%2Fwww.lassotalk.com%0ATo%20unsubscribe%2C%20E-mail%20to%3A%20%3CLasso-u
>nsubscribe%40lists.lassosoft.com>
>Send administrative queries to  <[hidden email]>
>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: interesting error

stevepiercy
Confirm the value is a string:

field('received') -> type

Else, no idea.  Restart, try again.

--steve


On 11/30/17 at 8:38 PM, [hidden email] (French, Shelane) pronounced:

> The only place that tag is used on my site goes like this:
>
> ---
> if(!valid_date(field('received')));
>   #sendemail = true;
>                       else(date(field('received'))->difference(date, -month) >=6);
>   #sendemail = true;
>                       /if;
> ---
>
>
> That is where the field received is a mysql date field.
>
> I say it's an odd error because valid_date is most certainly a defined tag
> as it is part of the Lasso core language.
>
> On 11/30/17, 10:12 AM, "[hidden email] on behalf of
> Steve Piercy - Website Builder" <[hidden email] on
> behalf of [hidden email]> wrote:
>
> >Sure, code doesn't write itself, but the values passed into it
> >have a likelihood of being not what one would expect.
> >
> >--steve
> >
> >
> >On 11/30/17 at 5:00 PM, [hidden email] (French, Shelane) pronounced:
> >
> >>That code has been in place for years. I will double check, but I didn't
> >>think so. Good point though.
> >>
> >>On 11/30/17, 8:43 AM, "[hidden email] on behalf of
> >>Steve Piercy - Website Builder" <[hidden email] on
> >>behalf of [hidden email]> wrote:
> >>
> >>>Why are you passing an array instead of a string as an argument?
> >>>
> >>>--steve
> >>>
> >>>
> >>>On 11/30/17 at 3:40 PM, [hidden email] (French, Shelane) pronounced:
> >>>
> >>>> This was an interesting error to get:
> >>>>   No tag, type or constant was defined under the name
> >>>>"valid_date" with
> >>>>arguments: array:
> >>>> (11/29/2017 19:49:51) (-9948)
> >>>>   #############################################################
> >>>>   This message is sent to you because you are subscribed to
> >>>>   the mailing list Lasso [hidden email]
> >>>> Official list archives available at
> >>>>http://secure-web.cisco.com/1_-Q9BhD28TYMJk4JXYNJ7EXu-9TZk2RP9NXp9kwlDA
> >>>>W6
> >>>>e1Jaoh3pOkvg9Sf_JHz1n1UGxXYyz_fACaMYfKnmSpaC2cyYwmeWEHJkUHqGj3kj7vIVXjV
> >>>>7h
> >>>>Om3uaGO2qABRA5C0szAnewrhN0SiBo6eHeGaWQsxwR6o1VuW_PNwTK_fLNsHEbHTFvb1t8u
> >>>>7Y
> >>>>UBBWWEYNv6oCPltY92Vp39QUX36txCiFeGS7VL-6_fD81Fr0AbM_kuweZ7MM1A7RtBTrLIm
> >>>>NP
> >>>>AmU2Kjw4WvWOm5MxHvNyBl5ZU3Jy7GHhLGukySTovLHjuyhWdL-tAlpbjGL1LtL8dwSbCuu
> >>>>Lj
> >>>>JV4GY4R2vXUFzEBmOMdA0Z5WYiS0SVo-v2Kt8XPLMpcPktU9/http%3A%2F%2Fwww.lasso
> >>>>ta
> >>>>lk.com%0A%3E%20To%20unsubscribe%2C%20E-mail%20to%3A%20%3CLasso-unsubscr
> >>>>ib
> >>>>e%40lists.lassosoft.com>
> >>>> Send administrative queries to  <[hidden email]>
> >>>
> >>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> >>>Steve Piercy              Website Builder              Eugene, OR
> >>><[hidden email]>               <http://www.stevepiercy.com/>
> >>>
> >>>
> >>>#############################################################
> >>>
> >>>This message is sent to you because you are subscribed to
> >>>the mailing list Lasso [hidden email]
> >>>Official list archives available at
> >>>http://secure-web.cisco.com/1MIHE0N4gzSx5y5cPcQNvjviH2RlioeS8ZEhyiuLvWA-
> >>>Ul
> >>>vgvpbFzsKKU8xXvtKb8w6J-HX52zc3qI94y4kKFWmbWJNbTwN0ZQAB0G47WIadIAYqdABuxm
> >>>Sr
> >>>I0X5jRk7cZ9C443j5xr83PfvOhOtMsLBHfP1OuTvOjsoisQ7KD7Ngnz4-P6A2bYCnj786Fop
> >>>4L
> >>>Pim1rpENNhy0yEa2MVTNupx4s7Urx21ovjeUC2Fyo2NNXmoMYMLROi0RhfQhpezc0poALJiS
> >>>4V
> >>>h5LhS6qQib3qlMZyknMH_wn1FTj00b591mxH35LZdRX3nu3P4CjDAgyrKZGpMaWJyp_13Cpn
> >>>3k
> >>>cZky9cV82-jU5iJUyYR5wVAWUkDu8OPVU3ipj9WuL2p/http%3A%2F%2Fwww.lassotalk.c
> >>>om
> >>>%0ATo%20unsubscribe%2C%20E-mail%20to%3A%20%3CLasso-unsubscribe%40lists.l
> >>>as
> >>>sosoft.com>
> >>>Send administrative queries to  <[hidden email]>
> >>>
> >>
> >>
> >>#############################################################
> >>
> >>This message is sent to you because you are subscribed to
> >>the mailing list Lasso [hidden email]
> >>Official list archives available at
> >>http://secure-web.cisco.com/15Q_1bhgVai6zYzERowRjFc6YSJ5ir508dNzGjlhHdxga
> >>ZRn0-8Jm47386wKFH2mt5C8NVrGK5nJ4gWNe5QtBF6op3jDaOWeMaa8T17lIrpU9vWZBtY1bt
> >>Tf4pzJfDwzC3g5wbqs6kkjwavkCRPWISwyXyPnpHzxAKadmf4g5NWfF7T_uiEZFogGU2f5iwj
> >>BW0sZOvZHyLzcVNNBTy3YUGpF2DCQ1UAJf0dvAqvT3PxdQ0JN6HPwsy9sUbs2scUs_XRjyB_C
> >>UyVmM0gXRz2cru0zETo4xgvnkKimrxcZmWxlSeMC4tYY0gdz190KQjpUPFGTFhvl_mnbAdqF4
> >>YYEHdM2TBxrVKmbVK92UtHB0_y9L0fp48Xvwc1p1Jv1IyWED2qROQPRmWy7Sdk-x-2IohA/ht
> >>tp%3A%2F%2Fwww.lassotalk.com%0A%3ETo%20unsubscribe%2C%20E-mail%20to%3A%20
> >>%3CLasso-unsubscribe%40lists.lassosoft.com>
> >>Send administrative queries to  <[hidden email]>
> >
> >-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> >Steve Piercy              Website Builder              Eugene, OR
> ><[hidden email]>               <http://www.stevepiercy.com/>
> >
> >
> >#############################################################
> >
> >This message is sent to you because you are subscribed to
> >  the mailing list Lasso [hidden email]
> >Official list archives available at
> >http://secure-web.cisco.com/1UgnPlgaFcjj_6O4LRWoqKUliH0ee5G8i11-6nVKkXFVF1
> >yyKremgsrjmTENZ8gB1A1JMfLfXQHL2Zlm1r27SejxPoViAqm6wQQSlGoMJFRMczKEc11vfrvZ
> >1dR_j3J8bcVs3jeaClkdTMUFBJ5M7qkAxvbWRwQ9JCZ02W9x8OJSUhedNqHM7s7FqOtVftd-eq
> >vux09dkVJw2dVPWToxJz4H4bAjqfZ5NLDD4TbLsCfvbArs_4YUMnTETcGp2IbRfxjTvQdhZmdF
> >HLuaCsP6RZ_8YJ5WQGYSX83gcKnjZwFGw7UthdieOYWs1JhNRtOxWzF7C1v2ozDZISVmTRk9A9
> >OHqxQQkpFYdRkTnUJ93XQyHXHIr2_0zRHOoERkAR7egVd0ZGHV1texjyupLbb_sCg/http%3A%
> >2F%2Fwww.lassotalk.com%0ATo%20unsubscribe%2C%20E-mail%20to%3A%20%3CLasso-u
> >nsubscribe%40lists.lassosoft.com>
> >Send administrative queries to  <[hidden email]>
> >
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>   the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy              Website Builder              Eugene, OR
<[hidden email]>               <http://www.stevepiercy.com/>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: interesting error

Jolle Carlestam-2
In reply to this post by French, Shelane
You didn’t answer if this was Lasso 8 or 9. In any case, here’s the definition for the method in Lasso 9:
        define valid_date(date, -format::string='') => {

                // Empty input
                #date == null ? return(false);
                string(#date)->trim & == '' ? return(false);

                // Parse date
                local(parse) = (#format != '' ? date(#date, -format=#format) | date(#date));
               
                // Invalid dates
                (#parse->type == 'null') ? return(false);
                (string(#parse)->size == 0) ? return(false);
// (#parse >> '0000') ? return(false);
               
                // Strict check of format against original date (allowing for leading zeroes or spaces)
                if(#format != '');
// string(#date) == #parse->format(regexp(-find='%-?_?', -replace='%')->replaceall(#format)) ? return(true);
// string(#date) == #parse->format(regexp(-find='%-?_?', -replace='%_')->replaceall(#format)) ? return(true);
// string(#date) == #parse->format(regexp(-find='%-?_?', -replace='%-')->replaceall(#format)) ? return(true);
                       
                        string(#date) == #parse->format(regexp(-find='%-?_?', -replace='%')->replaceall(-input=#format)) ? return(true);
                        string(#date) == #parse->format(regexp(-find='%-?_?', -replace='%_')->replaceall(-input=#format)) ? return(true);
                        string(#date) == #parse->format(regexp(-find='%-?_?', -replace='%-')->replaceall(-input=#format)) ? return(true);
                       
                        return(false);
                /if;
               
                return(true);
        }

This is part of the compatibility layer in Lasso 9. Did you perchance disable that?
BTW, the valid_date method has a flaw allowing false dates to validate as true. This will be reported as true for example:
valid_date(’2017-02-31’)
since valid_date turns the supplied string into a date object thus transforming it to, in this case, ’2017-03-03’.
To remedy that I have a replacement method for valid_date that adds an optional param -strict. Can be downloaded from here:
https://gist.github.com/jolle-c/cef289d6ac3db1f9f6c0

Used like this:
valid_date(’2017-02-31’, -strict)
it will report false since that is not a correct date.

If you put my version into your code base you’ll fix your problem and get a better solution as well.

HDB
Jolle

> 30 nov. 2017 kl. 21:38 skrev French, Shelane <[hidden email]>:
>
> The only place that tag is used on my site goes like this:
>
> ---
> if(!valid_date(field('received')));
> #sendemail = true;
> else(date(field('received'))->difference(date, -month) >=6);
> #sendemail = true;
> /if;
> ---
>
>
> That is where the field received is a mysql date field.
>
> I say it's an odd error because valid_date is most certainly a defined tag
> as it is part of the Lasso core language.


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>