libraries/common.lib.php might have not been loaded by the time PMA_isSerializable() is called.
This commit is contained in:
@@ -169,7 +169,11 @@ class PMA_Error extends PMA_Message
|
|||||||
*/
|
*/
|
||||||
public function getHash()
|
public function getHash()
|
||||||
{
|
{
|
||||||
$backtrace = PMA_isSerializable($this->getBacktrace()) ? serialize($this->getBacktrace()) : '';
|
try {
|
||||||
|
$backtrace = serialize($this->getBacktrace());
|
||||||
|
} catch(Exception $e){
|
||||||
|
$backtrace = '';
|
||||||
|
}
|
||||||
if (null === $this->_hash) {
|
if (null === $this->_hash) {
|
||||||
$this->_hash = md5(
|
$this->_hash = md5(
|
||||||
$this->getNumber() .
|
$this->getNumber() .
|
||||||
|
@@ -3022,21 +3022,4 @@ function PMA_buildActionTitles() {
|
|||||||
$titles['Edit'] = PMA_getIcon('b_edit.png', __('Edit'), true);
|
$titles['Edit'] = PMA_getIcon('b_edit.png', __('Edit'), true);
|
||||||
return $titles;
|
return $titles;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Determines whether a variable is serializable.
|
|
||||||
*
|
|
||||||
* @param object $var object which needs to be checked for serializability
|
|
||||||
*
|
|
||||||
* @return whether the object is serializable.
|
|
||||||
*/
|
|
||||||
function PMA_isSerializable($var)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
serialize($var);
|
|
||||||
return true;
|
|
||||||
} catch(Exception $e) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
Reference in New Issue
Block a user