From 9937f44e5a0286966b4efc785e09f630bc09296e Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 30 Mar 2009 16:34:04 +0000 Subject: [PATCH] "- using exceptions instead of die with function_backtrace --> gives nicer traces (specially with ajax) - fixed typo in get_array" --- etemplate/inc/class.boetemplate.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/etemplate/inc/class.boetemplate.inc.php b/etemplate/inc/class.boetemplate.inc.php index ae0b71da5d..94750d4012 100644 --- a/etemplate/inc/class.boetemplate.inc.php +++ b/etemplate/inc/class.boetemplate.inc.php @@ -528,7 +528,7 @@ class boetemplate extends soetemplate { if (!is_array($arr)) { - die('set_array() $arr is no array
'.function_backtrace()); + throw new egw_exception_assertion_failed(__METHOD__."(\$arr,'$idx','$val') \$arr is no array!"); } $idxs = explode('[',str_replace(']','',$idx)); $pos = &$arr; @@ -555,7 +555,7 @@ class boetemplate extends soetemplate { if (!is_array($arr)) { - die('set_array() $arr is no array
'.function_backtrace()); + throw new egw_exception_assertion_failed(__METHOD__."(\$arr,'$idx',$reference_into,$skip_empty) \$arr is no array!"); } if (is_object($idx)) return false; // given an error in php5.2 @@ -563,7 +563,7 @@ class boetemplate extends soetemplate $pos = &$arr; foreach($idxs as $idx) { - if (!is_array($pos) && !$referenz_info) + if (!is_array($pos) && !$reference_info) { return False; } @@ -586,7 +586,7 @@ class boetemplate extends soetemplate { if (!is_array($arr)) { - die('set_array() $arr is no array
'.function_backtrace()); + throw new egw_exception_assertion_failed(__METHOD__."(\$arr,'$idx') \$arr is no array!"); } $idxs = explode('[',str_replace(']','',$idx)); $last_idx = array_pop($idxs);