Check for json_last_error function existence before invoking.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@3482 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2011-07-22 08:34:35 +00:00
parent b40669dc75
commit a3ef933f2d
1 changed files with 16 additions and 13 deletions

View File

@ -2205,6 +2205,8 @@ function isVector ( &$array )
} }
function checkJsonError() function checkJsonError()
{
if ( function_exists('json_last_error') )
{ {
switch( json_last_error() ) switch( json_last_error() )
{ {
@ -2222,6 +2224,7 @@ function checkJsonError()
break; break;
} }
} }
}
function jsonEncode( &$value ) function jsonEncode( &$value )
{ {