Page 1 of 1
Unsupported operand types error
Posted: Sun Nov 13, 2022 11:26 pm
by lennyg
I just upgraded to 1.36.31 from 1.34. When I do:
http://localhost/zm/api/monitors/alarm/ ... nd:on.json
I'm getting:
"Unsupported operand types: string - int"
This was working on the old version. Any thoughts on what's going wrong?
Thanks
Re: Unsupported operand types error
Posted: Mon Nov 14, 2022 5:46 pm
by iconnor
Post the actual log, we need to know which line is generating that error.
Did you ONLY upgrade zoneminder? That looks more like a complaint from a newer php to me.
Re: Unsupported operand types error
Posted: Mon Nov 14, 2022 9:06 pm
by lennyg
You’re absolutely right. I actually got a new computer, with a whole new installation of Ubuntu.
Which log file should I be looking at? I looked around and couldn’t find anything relevant.
Thanks
Re: Unsupported operand types error
Posted: Thu Nov 17, 2022 5:04 pm
by iconnor
Found it.
Line 303 of /usr/share/zoneminder/www/api/app/Controller/MonitorsController.php needs to be:
$status = intval($status) - 1;
Re: Unsupported operand types error
Posted: Sat Nov 19, 2022 6:35 pm
by lennyg
That did the trick. Thanks for your help and your quick reply (especially considering I didn't give you much info).