UpdatePathBase has the following code:
/**
* {@inheritdoc}
*/
protected function rebuildAll() {
parent::rebuildAll();
// Remove the notices we get due to the menu link rebuild prior to running
// the system updates for the schema change.
foreach ($this->assertions as $key => $assertion) {
if ($assertion['message_group'] == 'Notice' && basename($assertion['file']) == 'MenuTreeStorage.php' && strpos($assertion['message'], 'unserialize(): Error at offset 0') !== FALSE) {
unset($this->assertions[$key]);
$this->deleteAssert($assertion['message_id']);
$this->results['#exception']--;
}
}
}
Unfortunately this hack doesn't work when you use --die-on-fail.
The quick fix would be to add a try/catch around this.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 2549045-5.patch | 822 bytes | pwolanin |
Comments
Comment #2
neclimdulPersonally, I'm not really sure this is a sustainable approach. If we can it would be nice if we had a more solid approach to this problem. I don't know what that is though.
Comment #3
neclimdulComment #4
pwolanin commentedYou can't really try/catch since you don't want to break out of the logic. You also don't want to suppress errors since you want to see others - maybe this test can change the die on fail behavior?
Comment #5
pwolanin commentedComment #6
neclimdulYeah, I was mistaken anyways. Throwing an exception would be the logical thing for simpletest to do in this case. Instead it prints the error and calls exit giving not way to work around excepted notices.
Comment #7
neclimdulsolves the problem.
Comment #8
alexpottCommitted 3b3680e and pushed to 8.0.x. Thanks!