Skip to content
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

Unable to add IP camera using make 'IP Camera' and model 'Default #647

Open
curtishall opened this issue Jan 4, 2024 · 1 comment · May be fixed by #648
Open

Unable to add IP camera using make 'IP Camera' and model 'Default #647

curtishall opened this issue Jan 4, 2024 · 1 comment · May be fixed by #648
Assignees

Comments

@curtishall
Copy link
Member

2024/01/03 19:45:24 [error] 28#28: *674 FastCGI sent in stderr: "PHP message: PHP Notice: Trying to access array offset on value of type bool in /usr/share/bluecherry/www/lib/lib.php on line 844PHP message: PHP Notice: Trying to access array offset on value of type null in /usr/share/bluecherry/www/lib/lib.php on line 844PHP message: PHP Fatal error: Data too long for column 'model' at row 1 query:INSERT INTO Devices (device_name, protocol, device, driver, rtsp_username, rtsp_password, resolutionX, resolutionY, mjpeg_path, model, rtsp_rtp_prefer_tcp, onvif_port, substream_path, hls_window_size, hls_segment_size, hls_segment_duration) VALUES ('1', 'IP-RTSP', '127.0.0.1|554|/', '', '', '', 640, 480, '127.0.0.1|80|', 'IP%20Camera - recpSlTQIiaJez87D', 0, 80,'127.0.0.1|554|/', 5, 2695168, 3.0) in /usr/share/bluecherry/www/lib/lib.php on line 238" while reading response header from upstream, client: 192.168.86.197, server: , request: "POST /addip HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "192.168.86.194:7001", referrer: "https://192.168.86.194:7001/addip"

@curtishall
Copy link
Member Author

The problem is this line:

                                foreach($data['records'] as $camera) {
                    $list[rawurlencode($manufacturer).' - '.$camera['id']] = $camera['fields']['Model'];
                                }

Fix:

                    $list[rawurlencode($manufacturer)] = $camera['fields']['Model'];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants