PHP error in monitorprobe.php on line 310

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
User avatar
UnicornDuctTape
Posts: 6
Joined: Wed Jan 15, 2020 9:14 pm

PHP error in monitorprobe.php on line 310

Post by UnicornDuctTape » Wed Jan 15, 2020 10:21 pm

I'm in the process of installing Zoneminder for the first time and when I try to add cameras using the Probe option I get the following error:-
Fatal error: Uncaught Error: Unsupported operand types in /usr/local/www/zoneminder/skins/classic/views/monitorprobe.php:310 Stack trace: #0 /usr/local/www/zoneminder/index.php(255): require_once() #1 {main} thrown in /usr/local/www/zoneminder/skins/classic/views/monitorprobe.php on line 310
The offending line of code is:-

Code: Select all

$cameras += probeNetwork();
which looks pretty innocuous.

Installation is Zoneminder 1.32.3 from pkg on FreeBSD 12.1 / nginx 1.16.1_8,2 / MySQL 5.7.28_2 / php72-7.2.26
Cameras are all Dahua IP cams, 2x HDW4631C-A and 2x HDBW4631R-ZS all hooked up using DHCP though I'm not sure that's relevant at this point.

None of the guides I found for installing seemed to be even remotely right so I built my own nginx configs from scratch, which was not ideal but is right as far as I can tell.
Currently building: Home Automation Server [FreeBSD 12.1 / nginx / mysql + zoneminder + openhab]
Rolls of Unicorn duct tape used this year: 1

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

Re: PHP error in monitorprobe.php on line 310

Post by iconnor » Thu Jan 16, 2020 12:01 am

I think the issue is that in probeNetwork, on error we return nothing, when we should return an empty array.

I'll be pushing a fix to master, but unless you want to update, you will have to edit /usr/local/www/zoneminder/skins/classic/views/monitorprobe.php
on line 251 and 257 to be return $cameras.

User avatar
UnicornDuctTape
Posts: 6
Joined: Wed Jan 15, 2020 9:14 pm

Re: PHP error in monitorprobe.php on line 310

Post by UnicornDuctTape » Thu Jan 16, 2020 4:43 pm

That makes sense. Thanks for the speedy response.

I’m not averse to updating or to risking breakages but as I’m new to Zoneminder I want to make sure my setup is working on a stable build and then try my hand with 1.33 - it looks like 1.34 is close as a support board is now showing for it.

Am I right in assuming that 1.34 will be a release/stable build?
Currently building: Home Automation Server [FreeBSD 12.1 / nginx / mysql + zoneminder + openhab]
Rolls of Unicorn duct tape used this year: 1

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

Re: PHP error in monitorprobe.php on line 310

Post by iconnor » Fri Jan 17, 2020 3:32 pm

Yes, 1.34.* is a stable progression.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests