mirror of
https://github.com/filp/whoops.git
synced 2026-09-16 04:36:20 +00:00
fixed 'Calling assert() with a string argument is deprecated' warning with php 7.2
This commit is contained in:
@@ -67,7 +67,7 @@ class XmlResponseHandler extends Handler
|
||||
*/
|
||||
private static function addDataToNode(\SimpleXMLElement $node, $data)
|
||||
{
|
||||
assert('is_array($data) || $node instanceof Traversable');
|
||||
assert(is_array($data) || $node instanceof Traversable);
|
||||
|
||||
foreach ($data as $key => $value) {
|
||||
if (is_numeric($key)) {
|
||||
@@ -98,7 +98,7 @@ class XmlResponseHandler extends Handler
|
||||
*/
|
||||
private static function toXml($data)
|
||||
{
|
||||
assert('is_array($data) || $node instanceof Traversable');
|
||||
assert(is_array($data) || $node instanceof Traversable);
|
||||
|
||||
$node = simplexml_load_string("<?xml version='1.0' encoding='utf-8'?><root />");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user