diff --git a/magmi/inc/magmi_engine.php b/magmi/inc/magmi_engine.php index 74b735a9..f88ac06b 100755 --- a/magmi/inc/magmi_engine.php +++ b/magmi/inc/magmi_engine.php @@ -390,7 +390,8 @@ public function getExceptionTrace($tk, &$traces) { $this->_excid++; $trstr = ""; - //FIXME: infinity loop in M2 + //todo: improve infinity loop handling in M2 + $counter = 0; foreach ($traces as $trace) { if (isset($trace["file"])) { $fname = str_replace(dirname(dirname(__FILE__)), "", $trace["file"]); @@ -407,6 +408,10 @@ public function getExceptionTrace($tk, &$traces) $trstr .= "\n"; } } + // simple max trace depth fix + if (++$counter % 20 === 0) { + break; + } } if (!isset($this->_exceptions[$tk])) { $this->_exceptions[$tk] = array(0,$this->_excid);