when I clear cache with drush, I got some notices caused by input_formats:
WD php: Notice: Undefined property: stdClass::$in_code_only in input_formats_load_all() (line 772 of [error]
input_formats/input_formats.module).
WD php: Notice: Undefined property: stdClass::$in_code_only in input_formats_load_all() (line 785 of [error]
input_formats/input_formats.module).
WD php: Notice: Undefined index: description in ctools_content_process() (line 72 of [error]
ctools/includes/content.inc).
WD php: Notice: Undefined property: stdClass::$in_code_only in input_formats_strongarm() (line 82 of [error]
input_formats/input_formats.module)
WD php: Notice: Undefined property: stdClass::$settings in _ctools_export_unpack_object() (line 601 of [error]
ctools/includes/export.inc).
WD php: Notice: Undefined index: fields in _ctools_export_unpack_object() (line 609 of [error]
ctools/includes/export.inc).
Any ideas why these notices appears?
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 1208434-input-filter-php-notices-6.patch | 3.19 KB | thedavidmeister |
| #4 | notice-patch-1208434-4.patch | 2.88 KB | IRuslan |
| #2 | notice-patch-1208434-2.patch | 857 bytes | IRuslan |
Comments
Comment #1
dagmarThey seems PHP 5.3 warnings.
Comment #2
IRuslan commentedAbout
WD php: Notice: Undefined property: stdClass::$settings in _ctools_export_unpack_object() (line 601 of [error]
ctools/includes/export.inc).
This patch helps for me.
This strings define field options, but they are not present in table, so that's why ctools invoke notice, while unpacking object.
Comment #3
IRuslan commentedAbout
WD php: Notice: Undefined index: fields in _ctools_export_unpack_object() (line 609 of [error]
ctools/includes/export.inc).
see #1228468: PHP notice "WD php: Notice: Undefined index: fields in _ctools_export_unpack_object()"
Comment #4
IRuslan commentedAbout notices lie that:
WD php: Notice: Undefined property: stdClass::$in_code_only in input_formats_load_all() (line 785 of [error]
input_formats/input_formats.module).
It caused because ctools export not always set in_code_only object proterty, and as a result we get notice on calls like $input_format->in_code_only.
On my point of view now easier add empty() or isset() instead investigation of correct behavior ctools module and setting up in_code_only to FALSE in proper places.
Comment #5
thedavidmeister commentedPatch in #4 works, superficially at least.
Comment #6
thedavidmeister commentedActually, I still was getting a notice for use of an undefined index in input_formats_get_roles()
This patch extends on #4 but includes an isset() for that function too.
I do however feel that sprinkling empty() and isset() everywhere is not really the correct solution, input_formats_load_all() should merge in a default of something falsey for $input_formats->in_code_only so when it isn't set as it is loaded it gets mopped up right at the source. For that reason I'm setting this to needs work.
Fix should probably go around here inside input_formats_load_all():
The site I'm using this module on the most is moving to D7 in the next month or two, so I can't really justify spending time implementing or testing this idea extensively, sorry!
Comment #7
thedavidmeister commented