Closed pfrenssen closed 9 years ago
A possible failing test:
$class = Parser::parseSnippet('class Foo {}');
$func = Parser::parseSnippet(<<<END
function translate_set_settings_form_validate($form, $form_state) {
if ($form_state['values']['translate_set_tracking_enabled'] && empty($form_state['values']['translate_set_tracking_contexts'])) {
form_set_error('translate_set_tracking_contexts', t('Tracking contexts is required.'));
}
}
END
);
$method = ClassMethodNode::fromFunction($func);
$method->setName('validateForm');
$class->appendMethod($method);
Fixed on master
We are using Pharborist as part of the Drupal Module Upgrader project. Recently we started getting fatal errors (ref #2409797):
I tracked this down to commit 2bb27. This commit is labeled "Code cleanup" but some functional changes seem to have crept in there.
If I partially revert that commit the fatal errors go away:
I've not yet had the time to familiarize myself with the Pharborist code base, so this report might be due to a wrong implementation on our end.