Hi,
after updating from PHP7.1 to 7.2, a fatal error was produced by the "Conditional Rules" modules:
Fatal error: Declaration of RulesConditionalEmptyUI::form(&$form, &$form_state, $options = Array) must be compatible with RulesContainerPluginUI::form(&$form, &$form_state, $options = Array, $iterator = NULL) in /sites/all/modules/rules_conditional/includes/rules_conditional.ui.inc on line 0
After comparing similar errors form other modules, I've created a diff of my changes in the file "includes/rules_conditional.ui.inc" - sorry, but I have no idea how to create a "real" diff, but I hope that this helps:
@@ -37,7 +37,7 @@
* Empty UI for doing nothing with the plugin.
*/
class RulesConditionalEmptyUI extends RulesConditionalPluginUI {
- public function form(&$form, &$form_state, $options = array()) {
+ public function form(&$form, &$form_state, $options = array(), $iterator = NULL) {
// Save element.
$this->element->save();
// Redirect right away.
@@ -75,7 +75,7 @@
/**
* Delegates the form to the predicate.
*/
- public function form(&$form, &$form_state, $options = array()) {
+ public function form(&$form, &$form_state, $options = array(), $iterator = NULL) {
$baseCount = count(explode('/', RulesPluginUI::$basePath));
$op = arg($baseCount + 2);
if ($op == 'add') {
@@ -196,7 +196,7 @@
* UI for while loops to add extra description.
*/
class RulesConditionalWhileUI extends RulesConditionalPredicateUI {
- public function form(&$form, &$form_state, $options = array()) {
+ public function form(&$form, &$form_state, $options = array(), $iterator = NULL) {
parent::form($form, $form_state, $options);
// Display help for while loop.
@@ -237,7 +237,7 @@
$this->actions = $object->actionContainer();
}
- public function form(&$form, &$form_state, $options = array()) {
+ public function form(&$form, &$form_state, $options = array(), $iterator = NULL) {
$form_state['rules_element'] = $this->set;
$form += array('actions' => array('#weight' => -5, '#tree' => TRUE));
Regards,
Oliver
Comments
Comment #2
alansaviolobo commentedThis is a duplicate of 2959426. Please use the dev version.