Skip to content

Commit

Permalink
Added initialization of array _callers[] (macopedia#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChameleonDevil authored and tmotyl committed Sep 26, 2019
1 parent b7dd5e8 commit 3261a0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions magmi/inc/magmi_mixin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class Magmi_Mixin
{
protected $_callers;
protected $_callers = array();

public function bind($caller)
{
Expand All @@ -25,7 +25,7 @@ public function __call($data, $arg)
if (substr($data, 0, 8) == "_caller_") {
$data = substr($data, 8);
}
$ccallers = count($this->_callers);
$ccallers = empty($this->_callers) ? 0 : count($this->_callers);
for ($i = 0; $i < $ccallers; $i++) {
if (method_exists($this->_callers[$i], $data)) {
return call_user_func_array(array($this->_callers[$i], $data), $arg);
Expand Down

0 comments on commit 3261a0c

Please sign in to comment.