Skip to content

Commit

Permalink
Fixed issue #08474: Unable to advance on survey when any numeric fiel…
Browse files Browse the repository at this point in the history
…d answer starts with 0

Dev: numeric question type remove the 0 in DB, not text question type
  • Loading branch information
Shnoulle committed Dec 19, 2013
1 parent 0a24a31 commit d9dc733
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/helpers/expressions/em_core_helper.php
Expand Up @@ -2583,11 +2583,11 @@ function exprmgr_if($test,$ok,$error)
* Return true if the variable is an integer
* @param string $arg
* @return boolean
* @link http://www.php.net/manual/en/function.is-int.php#87670
* @link http://php.net/is_int#82857
*/
function exprmgr_int($arg)
{
return ($arg !== true) && ((string)(int) $arg) === ((string) $arg);
return (ctype_digit((string)$arg));// Accept empty value too before PHP 5.1 see http://php.net/ctype-digit#refsect1-function.ctype-digit-changelog
}
/**
* Join together $args[0-N] with ', '
Expand Down

0 comments on commit d9dc733

Please sign in to comment.