fixed 'Calling assert() with a string argument is deprecated' warning with php 7.2

This commit is contained in:
Markus Staab
2017-12-01 10:20:03 +01:00
parent 86eee8872b
commit f39a563afc
+2 -2
View File
@@ -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 />");