Skip to content

Commit dff94c9

Browse files
author
Ivan Gavryshko
committed
MAGETWO-31422: XML file syntax error does not report file name error is in
- fixed function to according to signature.
1 parent 72f1cb2 commit dff94c9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/internal/Magento/Framework/Xml/Parser.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,9 @@ public function loadXML($string)
182182
*/
183183
public function errorHandler($errorNo, $errorStr, $errorFile, $errorLine)
184184
{
185-
if ($errorNo == 0) {
186-
return false;
185+
if ($errorNo != 0) {
186+
$message = "{$errorStr} in {$errorFile} on line {$errorLine}";
187+
throw new \Magento\Framework\Exception($message);
187188
}
188-
$message = "{$errorStr} in {$errorFile} on line {$errorLine}";
189-
throw new \Magento\Framework\Exception($message);
190189
}
191190
}

0 commit comments

Comments
 (0)