2008-12-23 Evi Vanoost <vanooste@rcbi.rochester.edu
* include/functions.php: Fixed format_numeric in case there are characters in a number or the number is not a number. Fixes notices from fmod. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1304 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
168182aba4
commit
f1ef56e1c1
|
@ -1,3 +1,8 @@
|
|||
2008-12-23 Evi Vanoost <vanooste@rcbi.rochester.edu
|
||||
|
||||
* include/functions.php: Fixed format_numeric in case there are characters
|
||||
in a number or the number is not a number. Fixes notices from fmod.
|
||||
|
||||
2008-12-23 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* pandoradb_data.sql, include/config.php, pandoradb.sql,
|
||||
|
|
|
@ -375,6 +375,8 @@ function pagination ($count, $url, $offset, $pagination = 0) {
|
|||
* @return
|
||||
*/
|
||||
function format_numeric ($number, $decimals = 1) {
|
||||
$number = (float) $number; //Translate to float in case there are characters in the string so fmod doesn't throw a notice
|
||||
|
||||
if ($number == 0)
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue