I just set an error-handler for my pages and suddenly got a flood of errors, each of them either E_WARNING (2), E_NOTICE (8), or E_RECOVERABLE_ERROR (4096). Here is the first line of the interesting backtrace minus the context, which was a huge var_dump. (Strangely, all the contexts had the two parameter values switched between their identifiers.)
Code:
#0 handle_error(4096, Object of class DOMElement could not be converted to string, /home/coder/www/lib/PHP/files/file_list.php, 329, ...) called at [/home/coder/www/lib/PHP/files/file_list.php:329]
Here is line 329; $dir is the one which the DOMElement ($element) gets switched with. I tried using $element instead of $dir here, but that just doubled the number of 4096s I saw.
Code:
$nodes = array_fill_keys(scandir($_SERVER['DOCUMENT_ROOT'] . $dir), array());
Thanks for trying to help.
Bookmarks