MDL-60281 general: remove class object() completely
This class was deprecated under MDL-52471 and was showing debugging notice from Moodle 3.0.1 In PHP7.2 the class declaration fails with fatal error even if it's not used anywhere
This commit is contained in:
@@ -51,27 +51,6 @@ define('MEMORY_EXTRA', -3);
|
||||
/** Extremely large memory limit - not recommended for standard scripts */
|
||||
define('MEMORY_HUGE', -4);
|
||||
|
||||
|
||||
/**
|
||||
* Simple class. It is usually used instead of stdClass because it looks
|
||||
* more familiar to Java developers ;-) Do not use for type checking of
|
||||
* function parameters. Please use stdClass instead.
|
||||
*
|
||||
* @package core
|
||||
* @subpackage lib
|
||||
* @copyright 2009 Petr Skoda {@link http://skodak.org}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @deprecated since 2.0
|
||||
*/
|
||||
class object extends stdClass {
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
public function __construct() {
|
||||
debugging("'object' class has been deprecated, please use stdClass instead.", DEBUG_DEVELOPER);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Base Moodle Exception class
|
||||
*
|
||||
|
||||
@@ -469,12 +469,6 @@ class core_setuplib_testcase extends advanced_testcase {
|
||||
}
|
||||
}
|
||||
|
||||
public function test_object() {
|
||||
$obj = new object();
|
||||
$this->assertDebuggingCalled("'object' class has been deprecated, please use stdClass instead.");
|
||||
$this->assertInstanceOf('stdClass', $obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* Data provider for test_get_real_size().
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user