mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-09-23 10:22:05 +00:00
Merge "Replace gettype() with get_debug_type() in exception messages etc."
This commit is contained in:
commit
507f573962
|
@ -57,7 +57,7 @@ class CachedList implements ContainmentList {
|
|||
if ( !is_array( $result ) ) {
|
||||
throw new UnexpectedValueException( sprintf(
|
||||
"Expected array but received '%s' from '%s::getValues'",
|
||||
is_object( $result ) ? get_class( $result ) : gettype( $result ),
|
||||
get_debug_type( $result ),
|
||||
get_class( $this->nestedList )
|
||||
) );
|
||||
}
|
||||
|
|
|
@ -519,7 +519,7 @@ class NotificationController {
|
|||
$notify->addFilter( static function ( $user ) use ( &$seen, $fname ) {
|
||||
if ( !$user instanceof User ) {
|
||||
wfDebugLog( $fname, 'Expected all User instances, received: ' .
|
||||
( is_object( $user ) ? get_class( $user ) : gettype( $user ) )
|
||||
get_debug_type( $user )
|
||||
);
|
||||
|
||||
return false;
|
||||
|
|
|
@ -64,8 +64,8 @@ class FilteredSequentialIterator implements IteratorAggregate {
|
|||
} elseif ( $users instanceof IteratorAggregate ) {
|
||||
$it = $users->getIterator();
|
||||
} else {
|
||||
throw new InvalidArgumentException( 'Expected array, Iterator or IteratorAggregate but received:' .
|
||||
( is_object( $users ) ? get_class( $users ) : gettype( $users ) )
|
||||
throw new InvalidArgumentException( 'Expected array, Iterator or IteratorAggregate but received ' .
|
||||
get_debug_type( $users )
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue