Skip to content

Commit

Permalink
www/template/ajax/users.php: Fix array operation
Browse files Browse the repository at this point in the history
2024/02/12 18:04:30 [error] 1354432#1354432: *20269 FastCGI sent in stderr: "
PHP Warning:  Cannot assign an empty string to a string offset in /usr/share/bluecherry/www/template/ajax/users.php on line 46
PHP Warning:  implode(): Invalid arguments passed in /usr/share/bluecherry/www/template/ajax/users.php on line 48

Since tmp is used as `$tmp[$id]`, it should be constructed as an array,
not a string. This fixes both warnings.
  • Loading branch information
andrey-utkin committed Feb 13, 2024
1 parent 67c58ec commit 7e46efd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion www/template/ajax/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<tbody>
<?php
foreach($dvr_users->data as $id => $info){
$email_list = ''; $emails = ''; $email = ''; $tmp = '';
$email_list = ''; $emails = ''; $email = ''; $tmp = array();
$emails = explode('|', $info['email']);
foreach($emails as $id => $email){
$email = explode(':', $email);
Expand Down

0 comments on commit 7e46efd

Please sign in to comment.