-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal PHP error in ?view=console #4224
Comments
I think line 182 should be if(!$this->{'Server'}) { Is it possiblie that the monitor has a non-empty but not valid ServerId? |
I'm not sure about the cause... I have no multiserver configuration but I may have changed something after upgrade that caused it... The issue seems to have gone once I've cleared "groups" to "all" in console... |
Hmm... yeah I tested my theory and it didn't pan out. So you had a group selected... I wonder if there was a deleted monitor in that group or something like that? Time to do more testing. |
I also thought about "non-empty but not valid ServerId" but issue cleared only after manipulation with groups. Before that I did re-save configuration of all cameras, trying to set server explicitly either to "None" or to "Auto" in attempt to resolve the issue (just in case there was something historical left in camera settings.) I created this bug report after failing to clear the error, but then, unexpectedly, it was gone after I tried selecting groups. Sorry for lack of clear reproducer. Perhaps |
I think it is. Normally when we load a db record, it contains an entry for ServerId, so the property gets defined. If the record didn't exist, then we might do return new ZM\Monitor(); Which would create an empty object, but all those fields aren't actually defined as properties. Hence the test for the property existing. It appears there though that the property exists, but is null.... and we don't test for that... so I think I see how the code should be improved... |
If you are able to make it happen again, can you try replacing the function with the following? |
ZoneMinder 1.36.35 with PHP8.2 on Debian 12 "bookworm" (Debian package).
I'm getting the following server-side error when opening console view in browser:
The text was updated successfully, but these errors were encountered: