diff --git a/lib/classes/deprecation.php b/lib/classes/deprecation.php index 00738d8faa3..39aae1e5214 100644 --- a/lib/classes/deprecation.php +++ b/lib/classes/deprecation.php @@ -83,6 +83,9 @@ class deprecation { // The reference is an array, but it's not an object or a class that currently exists. return null; } + + // The reference is none of the above. + return null; } /** diff --git a/lib/tests/deprecation_test.php b/lib/tests/deprecation_test.php index dc0a1721fd0..f0b50242680 100644 --- a/lib/tests/deprecation_test.php +++ b/lib/tests/deprecation_test.php @@ -285,6 +285,9 @@ class deprecation_test extends \advanced_testcase { // Deprecated global function. ['core\fixtures\deprecated_function', true], ['core\fixtures\not_deprecated_function', false], + + // Empty array. + [[], false], ]; }