bug #3486970 [import] Exception on XML import
This commit is contained in:
@@ -2,6 +2,7 @@ phpMyAdmin - ChangeLog
|
||||
======================
|
||||
|
||||
3.4.11.0 (not yet released)
|
||||
- bug #3486970 [import] Exception on XML import
|
||||
|
||||
3.4.10.0 (2012-02-14)
|
||||
- bug #3460090 [interface] TextareaAutoSelect feature broken
|
||||
|
@@ -169,13 +169,14 @@ class PMA_Error extends PMA_Message
|
||||
*/
|
||||
public function getHash()
|
||||
{
|
||||
$backtrace = PMA_isSerializable($this->getBacktrace()) ? serialize($this->getBacktrace()) : '';
|
||||
if (null === $this->_hash) {
|
||||
$this->_hash = md5(
|
||||
$this->getNumber() .
|
||||
$this->getMessage() .
|
||||
$this->getFile() .
|
||||
$this->getLine() .
|
||||
serialize($this->getBacktrace())
|
||||
$backtrace
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -3020,4 +3020,21 @@ function PMA_buildActionTitles() {
|
||||
$titles['Edit'] = PMA_getIcon('b_edit.png', __('Edit'), true);
|
||||
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;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@@ -186,7 +186,7 @@ $data_present = false;
|
||||
/**
|
||||
* Only attempt to analyze/collect data if there is data present
|
||||
*/
|
||||
if (@count($xml->children())) {
|
||||
if ($xml && @$xml->count()) {
|
||||
$data_present = true;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user