mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-04 02:22:39 +00:00
Adding fix for Ticket #1063
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3234 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
5af4c7e372
commit
0a5b1b6450
1 changed files with 2 additions and 2 deletions
|
@ -54,8 +54,8 @@ class TimeHelper extends Helper {
|
|||
* @return string Formatted date string
|
||||
*/
|
||||
function fromString($date_string) {
|
||||
if (is_integer($date_string)) {
|
||||
return $date_string;
|
||||
if (is_integer($date_string) || is_numeric($date_string)) {
|
||||
return intval($date_string);
|
||||
} else {
|
||||
return strtotime($date_string);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue