Re: [SMARTY-DEV] php-notice in plugins/function.html_select_date.php

From: Date: Tue, 18 Jun 2002 14:18:14 +0000
Subject: Re: [SMARTY-DEV] php-notice in plugins/function.html_select_date.php
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-158@lists.php.net to get a copy of this message
These changes have been committed. Monte matled wrote:
I just ran the example coming with smarty and got directly this tow notices: Notice: Undefined variable: time in [...]/smarty/plugins/function.html_select_date.php on line 59 Notice: Undefined variable: time in [...]/smarty/plugins/function.html_select_date.php on line 63 I would suggest to add this below line 23:
    $time            = strftime('%Y-%m-%d');
Another thing I saw while reading the code for solving this notices was the function smarty_make_timestamp (plugins/shared.make_timestamp.php). I think it would be useful if it returns always a valid timestamp. This is not sure because of: // can't decipher, just return it return $string; I think it should be checked if $string is a timestamp and if not it should return a valid one. Perhaps something as this: if((int)$time > 0)
    return (int)$time;
else
    return time();


« previous php.smarty.dev (#158) next »