bug #3486970 [import] Exception on XML import

This commit is contained in:
Madhura Jayaratne
2012-02-18 14:43:05 +05:30
parent 0a4357121e
commit 0d1407f178
4 changed files with 21 additions and 2 deletions

View File

@@ -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;
}
}
?>