X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Farraywrapper.php;h=f9d3c3cf946313d14b35b2ee4cfca2fd1e59a706;hb=650af0a27102e5e9067850c88e5b8a446b44f045;hp=424714e908c46f8a6795e9eaff1e75501390f7bc;hpb=865b716f0919b6e5133133cd6be53f4143660324;p=quix0rs-gnu-social.git diff --git a/lib/arraywrapper.php b/lib/arraywrapper.php index 424714e908..f9d3c3cf94 100644 --- a/lib/arraywrapper.php +++ b/lib/arraywrapper.php @@ -17,7 +17,7 @@ * along with this program. If not, see . */ -if (!defined('STATUSNET')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -76,6 +76,10 @@ class ArrayWrapper function __call($name, $args) { $item =& $this->_items[$this->_i]; + if (!is_object($item)) { + common_log(LOG_ERR, "Invalid entry " . var_export($item, true) . " at index $this->_i of $this->N; calling $name()"); + throw new ServerException("Internal error: bad entry in array wrapper list."); + } return call_user_func_array(array($item, $name), $args); } }