Closed sueboothby closed 4 years ago
Have you tried redownloading Pods yet?
Nevermind, found the issue.
@JoryHogeveen See our usage of the +=
here converting the number but it is getting passed an array at some point: https://github.com/pods-framework/pods/blob/master/classes/fields/number.php#L172
I just noticed a message in the input page:
@sc0ttkclark I can see why that could cause the error, but why is this field getting a non-scalar value at all?? I cannot replicate this..
It happens every time I try to add a new post. It started happening after the latest WP update.
The problem Pod had one field "Sale Price" with the type "Currrency" and one field "List to Sale Price" with the type "Plain Number".
Changed "Sale Price" to "Plain Text" - still got error Changed "List to to Sale Price" to "Plain Text" - no error (both fields set to "Plain Text")
Changed "Sale Price" back to "Currency" - no error (field had value) Changed "List to Sale Price" back to "Plain Number" - no error (field had value / both fields had value)
Removed value from "List to Sale Price" - got error in input form at "List to Sale Price" field and Fatal Error when trying to view post Removed value from "Currency" - got error in input form at "Currency" field and Fatal Error when trying to view post
My current conclusion: if there is no value in a "Number" field, error. If there are values in the "Number" fields, no error.
Therefore, I can get around the error by entering 0 as the value for those fields. I had a conditional testing for an empty field. I will change it to test for zero-value instead.
Hi @sueboothby
Check, not sure why, but I can only replicate a warning, not a fatal error. This PR should fix it: #5666 Let me know!
@sueboothby You can download the patched version of Pods through https://pods.io/latest/
@jimtrue Not yet, this patch isn't merged yet.
Download link of the patch: https://github.com/pods-framework/pods/archive/feature/5662-php-warning-operand-types.zip
Let me know when the patch is merged. Thank you for working on this.
@sueboothby Could you test the patch and let us know if it also fixes your case? Since I could not reproduce the fatal error I want to make sure it actually fixes your issue.
@sueboothby To make it easier, here's the ZIP for the fixed version of Pods you'll want to test with: https://github.com/pods-framework/pods/archive/feature/5662-php-warning-operand-types.zip
I installed the patched version of Pods. The issue is resolved. Thank you!!!
Issue Overview
Getting Fatal Error when adding new Pods posts
Expected Behavior
I expect the page to render as usual
Current Behavior
I am getting the following error message:
Steps to Reproduce (for bugs)
https://peterglaughlin.com/sarasota-luxury-homes/8350-carolina-street/
Possible Solution
WordPress Environment
Pods Package Export (helpful!)
Workaround or Alternate Solution Until Bug is Addressed
Related Issues and/or PRs