Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is causing fatal errors in tests (spotted by Damien), which don't get reported as fails because the test just gets skipped.
// Merge body field value and format separately.
$body = array(
'value' => $this->randomName(32),
'format' => FILTER_FORMAT_DEFAULT
);
$settings['body'][0] += $body;
$node = (object) $settings;
node_save($node);
Comment | File | Size | Author |
---|---|---|---|
#9 | php_node.patch | 543 bytes | andypost |
#1 | field_body_fix_test.patch | 680 bytes | yched |
Comments
Comment #1
yched CreditAttribution: yched commenteddrupalCreateNode() was updated for body as field - perhaps with a couple overlooked issues.
Going through all drupalCreateNode() calls, the only bug I could find was in php.test, incorrect format for the 'body' value.
Other than that, I don't see what would cause fatal errors, so a more specific report would be welcome.
Comment #2
bjaspan CreditAttribution: bjaspan commentedA more important question is why fatal errors are not reported by the tests. If that is possible, it is guaranteed that the problem occurs all over the place.
Comment #4
catchThought I'd pasted the error message, but clearly hadn't - the error was unsupported operand types in drupal_web_test_case.php - don't have that line number handy but must be the += there.
Comment #5
yched CreditAttribution: yched commentedre catch: Yes, the error seems pretty clear, but I don't see why it would happen - apart from the one case fixed in the patch above.
If Damien has more informations, they are welcome :-)
Of course, the test system needs to be fixed so that fatal errors are reported, but I think there's already an issue about that.
Comment #6
Damien Tournoud CreditAttribution: Damien Tournoud commentedHere is the error message.
It only happens in two (unidentified) test cases.
Comment #7
yched CreditAttribution: yched commentedOK, if it's not possible to know more (which tests), then how much does the patch in #1 makes things better ?
Comment #9
andypostSame patch, tested localy and stoping as from g2 testing
So duplicate #503116: I test failed
Comment #10
andypostIt's really interesting why tesbot v1 still not check fir notices? We need pifr 2
Comment #11
boombatower CreditAttribution: boombatower commentedErr...I'll have to look into this..but it reports notices (give you the worst case example to date): http://testing.drupal.org/pifr/file/1/theme.inc_.head__0_1.patch.
Complete annihilation with the addition of 4 lines. Extreme patch. :)
Comment #12
andypostchx and yched patches are same so lets commit it
Comment #13
webchickCommitted to HEAD!
Is there a follow-up issue somewhere for "Why isn't test bot reporting fatal errors?" If not, can someone make one? :)
Comment #14
catchThere's an issue for fatal errors somewhere.