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:
Ingo Schommer 2011-10-04 13:21:47 +02:00
parent 7b38fcfd2e
commit df56eb540a
2 changed files with 7 additions and 7 deletions

View File

@ -8,9 +8,9 @@
class FieldSet extends FieldList {
public function __construct($items = array()) {
user_error(
'FieldSet is deprecated, please use FieldList instead.', E_USER_NOTICE
);
// user_error(
// 'FieldSet is deprecated, please use FieldList instead.', E_USER_NOTICE
// );
parent::__construct(!is_array($items) || func_num_args() > 1 ? func_get_args(): $items);
}

View File

@ -7,10 +7,10 @@
class DataObjectSet extends ArrayList {
public function __construct($items = array()) {
user_error(
'DataObjectSet is deprecated, please use DataList or ArrayList instead.',
E_USER_NOTICE
);
// user_error(
// 'DataObjectSet is deprecated, please use DataList or ArrayList instead.',
// E_USER_NOTICE
// );
if ($items) {
if (!is_array($items) || func_num_args() > 1) {