PHP errors in lighttpd log

Hi All,

I'm getting a bunch of php errors repeated in the lighttpd logs. Any idea what it might be?

2017-12-18 19:28:54: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Warning: Invalid argument supplied for foreach() in /var/www/html/admin/scripts/pi-hole/php/auth.php on line 123
2017-12-18 19:28:59: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Warning: preg_split(): Delimiter must not be alphanumeric or backslash in /var/www/html/admin/scripts/pi-hole/php/auth.php on line 122

if I check out /var/www/html/admin/scripts/pi-hole/php/auth.php lines 122 and 123, it reads as follows:

$domains = preg_split('\s+', $_POST['domain']);
foreach($domains as $domain)

Hm, it appears we may need to add / to the front and end of the first argument in the preg_split function.

1 Like

Awesome - thanks for the quick reply.

So the correct line would look like this?

$domains = preg_split(’/\s+/’, $_POST[‘domain’]);

Try replacing that line and see if it spits out any more errors. Are you able to make a Pull Request to the web repo? GitHub - pi-hole/web: Pi-hole Dashboard for stats and more

Otherwise, I'll commit the change.

Sorry - Christmas holiday got in the way.

Best if you commit the change. Thanks

Done:
https://github.com/pi-hole/AdminLTE/pull/657

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.