opennetadmin / ona

OpenNetAdmin IP Address Management (IPAM) system
opennetadmin.com
GNU General Public License v2.0
137 stars 35 forks source link

PHP Notice: Array to string conversion #63

Open fxpottier opened 10 years ago

fxpottier commented 10 years ago

version of php is more strict with arrays. Lots of PHP notices in apache2 error.log :

PHP Notice: Array to string conversion in /opt/ona/www/include/functions_general.inc.php on line 7

foreach (array_keys($_REQUEST) as $key) printmsg("Name: $key Value: $_REQUEST[$key]", 3);

This is not a blocking issue.

PHP Version used : 5.4.4

mtompkins commented 10 years ago

+1

fxpottier commented 9 years ago

Possible solutions :

printmsg("Get/Post vars:", 3);
foreach (array_keys($_REQUEST) as $key) {
        if (is_array($_REQUEST[$key])) {
                $request=implode($_REQUEST[$key]);
                printmsg("Name: $key    Value: $request", 3);
        } else {
                printmsg("Name: $key    Value: $_REQUEST[$key]", 3);
        }
}