Closed (fixed)
Project:
Webform
Version:
7.x-4.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
26 Jul 2022 at 10:55 UTC
Updated:
29 Nov 2022 at 22:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
saurabh rawat commentedI am also facing same issue.
Comment #3
sadman commentedExperiencing the same issue with adding new conditionals after updating to PHP 8.0 There are no errors logged to Apache, PHP or Watchdog. There are no errors or warnings in the browser console that didn't appear with PHP 7.4. It doesn't seem to break existing conditions. It seems to be a broken UI for administering them.
Comment #4
liam morlandCan you explain in more detail what "it is just loading weight" means?
Comment #5
jdelon02 commentedI am having the same issue. Attached is a screenshot of "just loading weight"
Comment #6
bradallenfisher commentedYep can confirm this is definitely a PHP 8 thing. On my local PHP 7.4 it does not occur but on acquia cloud PHP 8.0 we can no longer add new conditionals.
Comment #7
liam morlandAre there any error messages, either for PHP or in the browser console?
Comment #8
saurabh rawat commentedYes, This is definitely PHP issue, when with same module I try with PHP 7.4 version, it works properly but when I upgrade xampp version to php 8 then this issue is coming.
and there is no error message coming in browser and PHP.
Comment #9
loon commentedComment #11
loon commentedIt's php8 related issue. The max() contain non-numeric and integer values and according to php doc -
Caution
Be careful when passing arguments of different types because max() can produce unpredictable results.
The following code
max(array(0, 1, 2, 'new'));will return int(2) but since PHP 8.0 above code returns string("new")
Comment #12
liam morlandIt would be great to get a test that would catch this. Under what circumstances is there a non-numeric
rgid?Comment #13
loon commented@Liam Morland
We have 'new' key by default, see webform_conditionals_form(). Any new conditionals will have a numeric key
Comment #14
solideogloria commentedConfirmed the issue with PHP 8.0, and the merge request fixes it.
Comment #16
liam morlandThanks everyone!