diff --git a/core/Convert.php b/core/Convert.php index c9ede1f7b..d11bdf919 100755 --- a/core/Convert.php +++ b/core/Convert.php @@ -186,7 +186,7 @@ class Convert extends Object { * @uses SimpleXMLElement */ protected static function recursiveXMLToArray($xml) { - if(get_class($xml) == 'SimpleXMLElement') { + if(is_object($xml) && get_class($xml) == 'SimpleXMLElement') { $attributes = $xml->attributes(); foreach($attributes as $k => $v) { if($v) $a[$k] = (string) $v; diff --git a/core/control/RequestHandler.php b/core/control/RequestHandler.php index 36cf157d8..bfcde5934 100644 --- a/core/control/RequestHandler.php +++ b/core/control/RequestHandler.php @@ -202,7 +202,7 @@ class RequestHandler extends ViewableData { // check if specific action is set if(isset($allowedActions[$actionOrAll])) { $test = $allowedActions[$actionOrAll]; - if($test === true) { + if($test === true || $test === 1 || $test === '1') { // Case 1: TRUE should always allow access return true; } elseif(substr($test, 0, 2) == '->') { diff --git a/core/model/Hierarchy.php b/core/model/Hierarchy.php index e12a3b39d..8998bce58 100644 --- a/core/model/Hierarchy.php +++ b/core/model/Hierarchy.php @@ -176,9 +176,11 @@ class Hierarchy extends DataObjectDecorator { */ protected function markingFinished() { // Mark childless nodes as expanded. - foreach($this->markedNodes as $id => $node) { - if(!$node->isExpanded() && !$node->numChildren()) { - $node->markExpanded(); + if($this->markedNodes) { + foreach($this->markedNodes as $id => $node) { + if(!$node->isExpanded() && !$node->numChildren()) { + $node->markExpanded(); + } } } } diff --git a/forms/ComplexTableField.php b/forms/ComplexTableField.php index 026e3be19..2f657d3d4 100755 --- a/forms/ComplexTableField.php +++ b/forms/ComplexTableField.php @@ -651,7 +651,8 @@ JS; $referrer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null; $closeLink = sprintf( - '(%s)', + '(%s)', + $referrer, _t('ComplexTableField.CLOSEPOPUP', 'Close Popup') );