Closed (fixed)
Project:
Webform
Version:
8.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
3 Jun 2015 at 16:17 UTC
Updated:
20 Jun 2015 at 01:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sumitmadan commentedComment #2
fenstratCommitted and pushed to 8.x-4.x.
Thanks for the bug report.
I couldn't reproduce this at first until I traced it back to having devel installed. Turns out the devel calls
set_error_handler('backtrace_error_handler');which then handles this error and simply logs it to watchdog, because after all it is a *Recoverable* fatal error. Disabling devel results in the fatal printed to screen and the uninstall failing.So my guess as to why this is happening is that calling
array_diff_assoc()on$entity_manager->getBaseFieldDefinitions('node', 'webform')causes a string conversion on at least one of the values (a magic __toString() call?). The odd thing is it only effects$entity_manager->getBaseFieldDefinitions()and not$entity_manager->getFieldDefinitions. Odd. Thankfully once that all made sense it was just a matter of callingarray_diff_key()which just looks at the keys rather thanarray_diff_assoc().Comment #4
sumitmadan commented$entity_manager->getBaseFieldDefinitions('node', 'webform')can be changed to$entity_manager->getBaseFieldDefinitions('node').Comment #5
sumitmadan commentedPlease review.
Comment #6
fenstratCommitted and pushed #5 to 8.x-4.x.
Good catch, thanks!
Comment #8
danchadwick commented