Merge branch 'MDL-77097_401' of https://github.com/stronk7/moodle into MOODLE_401_STABLE

This commit is contained in:
Andrew Nicols 2023-02-28 22:13:39 +08:00
commit 2a0980837d
3 changed files with 8 additions and 4 deletions

View File

@ -21,7 +21,7 @@ use MongoDB\Driver\Exception\InvalidArgumentException as DriverInvalidArgumentEx
use function array_pop;
use function count;
use function get_debug_type;
use function gettype;
use function implode;
use function is_array;
use function sprintf;
@ -57,6 +57,6 @@ class InvalidArgumentException extends DriverInvalidArgumentException implements
$expectedType = $typeString;
}
return new static(sprintf('Expected %s to have type "%s" but found "%s"', $name, $expectedType, get_debug_type($value)));
return new static(sprintf('Expected %s to have type "%s" but found "%s"', $name, $expectedType, gettype($value)));
}
}

View File

@ -17,7 +17,7 @@
namespace MongoDB\Exception;
use function get_debug_type;
use function gettype;
use function sprintf;
class ResumeTokenException extends RuntimeException
@ -30,7 +30,7 @@ class ResumeTokenException extends RuntimeException
*/
public static function invalidType($value)
{
return new static(sprintf('Expected resume token to have type "array or object" but found "%s"', get_debug_type($value)));
return new static(sprintf('Expected resume token to have type "array or object" but found "%s"', gettype($value)));
}
/**

View File

@ -11,3 +11,7 @@ Import procedure:
value in the "are_requirements_met" method if necessary.
This version (1.15.0) requires PHP mongodb extension >= 1.14.0
Local changes:
- Replaced 4 occurrences of get_debug_type() by gettype() to keep PHP 7.4 compatibility. Note this
has not been applied to 4.2dev and up because, there, it's safe to use get_debug_type().