MDL-60281 general: various strict corrections for PHP7.2
- count() can only be called on arrays or Countable, it can not be called on null - recordset is neither so iterator_count() should be used - instanceof or get_class() can not be applied to non-objects - class methods must have the same arguments as methods in parent class
This commit is contained in:
@@ -73,7 +73,7 @@ abstract class base_testcase extends PHPUnit_Framework_TestCase {
|
||||
public static function assertNotTag($matcher, $actual, $message = '', $ishtml = true) {
|
||||
$dom = PHPUnit_Util_XML::load($actual, $ishtml);
|
||||
$tags = self::findNodes($dom, $matcher, $ishtml);
|
||||
$matched = count($tags) > 0 && $tags[0] instanceof DOMNode;
|
||||
$matched = (is_array($tags) && count($tags) > 0) && $tags[0] instanceof DOMNode;
|
||||
self::assertFalse($matched, $message);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user