mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR Don't throw deprecation notice on DataObjectSet and FieldSet if there's still over 500 (!) references to them in core, as it basically means that everybody has to suppress PHP NOTICE errors for months, impacting core code quality
This commit is contained in:
parent
7b38fcfd2e
commit
df56eb540a
@ -8,9 +8,9 @@
|
|||||||
class FieldSet extends FieldList {
|
class FieldSet extends FieldList {
|
||||||
|
|
||||||
public function __construct($items = array()) {
|
public function __construct($items = array()) {
|
||||||
user_error(
|
// user_error(
|
||||||
'FieldSet is deprecated, please use FieldList instead.', E_USER_NOTICE
|
// 'FieldSet is deprecated, please use FieldList instead.', E_USER_NOTICE
|
||||||
);
|
// );
|
||||||
|
|
||||||
parent::__construct(!is_array($items) || func_num_args() > 1 ? func_get_args(): $items);
|
parent::__construct(!is_array($items) || func_num_args() > 1 ? func_get_args(): $items);
|
||||||
}
|
}
|
||||||
|
@ -7,10 +7,10 @@
|
|||||||
class DataObjectSet extends ArrayList {
|
class DataObjectSet extends ArrayList {
|
||||||
|
|
||||||
public function __construct($items = array()) {
|
public function __construct($items = array()) {
|
||||||
user_error(
|
// user_error(
|
||||||
'DataObjectSet is deprecated, please use DataList or ArrayList instead.',
|
// 'DataObjectSet is deprecated, please use DataList or ArrayList instead.',
|
||||||
E_USER_NOTICE
|
// E_USER_NOTICE
|
||||||
);
|
// );
|
||||||
|
|
||||||
if ($items) {
|
if ($items) {
|
||||||
if (!is_array($items) || func_num_args() > 1) {
|
if (!is_array($items) || func_num_args() > 1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user