Apache Error when filtering events.

Current Development version likely to have breaking changes
Post Reply
sonicspeedway
Posts: 12
Joined: Mon Jan 22, 2018 7:02 pm

Apache Error when filtering events.

Post by sonicspeedway »

On 1.37.47, getting this error in apache log when trying to filter events. This is my background delete filter, wasn't sure it was working so I filtered manually and it just set on the loading events screen when I click List Events. I deleted filter and re-made and still same issue.
Ubuntu 22.04.3 LTS

Screenshot 2023-12-13 082958.png
Screenshot 2023-12-13 082958.png (47.82 KiB) Viewed 23324 times

[Wed Dec 13 08:22:06.825476 2023] [php:error] [pid 1186357] [client 172.16.2.162:58797] PHP Fatal error: Uncaught Error: Value of type int is not callable in /usr/share/zoneminder/www/ajax/events.php:229\nStack trace:\n#0 /usr/share/zoneminder/www/ajax/events.php(127): queryRequest()\n#1 /usr/share/zoneminder/www/index.php(260): require_once('...')\n#2 {main}\n thrown in /usr/share/zoneminder/www/ajax/events.php on line 229, referer: http://172.16.10.9/zm/index.php?view=ev ... rval%5D=60
User avatar
iconnor
Posts: 3357
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Apache Error when filtering events.

Post by iconnor »

That's pretty weird. I suspect php has pulled the rug out from under us again.

I've pushed what might be a fix by adding more () to insure the int applies to the value of limit(). Maybe it will fix it.
sonicspeedway
Posts: 12
Joined: Mon Jan 22, 2018 7:02 pm

Re: Apache Error when filtering events.

Post by sonicspeedway »

Great, Thank You for the quick reply. Is there a way I can edit the source .php file with that change to test?
EDIT: I installed the 1.37.47~20231213193923-jammy from 12 hours ago. Did this one contain the fix? as I just ran the update and same error for now.

Thank You
User avatar
iconnor
Posts: 3357
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Apache Error when filtering events.

Post by iconnor »

I actually didn't fix the problem. My tired eyes didn't actually see it. Today's package has the real fix. On that line, the variable $has_post_sql_conditions is an integer, so shouldn't have () after it. Just remove them.
sonicspeedway
Posts: 12
Joined: Mon Jan 22, 2018 7:02 pm

Re: Apache Error when filtering events.

Post by sonicspeedway »

ok, I will run it when it publishes. I did just figure out something. In the filter, if I set the "Limit to first" and set it it too 0, the filter works.
EDIT: made that change to the events.php and it works.

Thank You again.
Post Reply