merge r4426 from branch 2.0 to trunk

bug 1211 fixed: with PHP 5.3, the get_class function requires the input
parameter to be an object, or else throws a E_WARNING message. In webservices
files, I have replaced all "get_class" calls by "@get_class".


git-svn-id: http://piwigo.org/svn/trunk@4427 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall
2009-12-04 23:19:26 +00:00
parent 110ce79b3c
commit 9c5cfbc789
5 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -152,7 +152,7 @@ class PwgRestEncoder extends PwgResponseEncoder
{
function encodeResponse($response)
{
$respClass = strtolower( get_class($response) );
$respClass = strtolower( @get_class($response) );
if ($respClass=='pwgerror')
{
$ret = '<?xml version="1.0"?>
@@ -259,7 +259,7 @@ class PwgRestEncoder extends PwgResponseEncoder
}
break;
case 'object':
switch ( strtolower(get_class($data)) )
switch ( strtolower(@get_class($data)) )
{
case 'pwgnamedarray':
$this->encode_array($data->_content, $data->_itemName, $data->_xmlAttributes);
@@ -273,7 +273,7 @@ class PwgRestEncoder extends PwgResponseEncoder
}
break;
default:
trigger_error("Invalid type ". gettype($data)." ".get_class($data), E_USER_WARNING );
trigger_error("Invalid type ". gettype($data)." ".@get_class($data), E_USER_WARNING );
}
}
}