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

Invalid argument supplied for foreach() by running iniscan show #100

Open
sandrokeil opened this issue Apr 20, 2016 · 4 comments
Open

Invalid argument supplied for foreach() by running iniscan show #100

sandrokeil opened this issue Apr 20, 2016 · 4 comments

Comments

@sandrokeil
Copy link

sandrokeil commented Apr 20, 2016

I get multiple PHP warnings if I run iniscan show. I use this php.ini and PHP 7.0 with iniscan version 3.6.4.

Current PHP.ini settings from /usr/local/etc/php/php.ini
##########
:: date.timezone

Warning: Invalid argument supplied for foreach() in /app/vendor/psecio/iniscan/src/Psecio/Iniscan/Command/ShowCommand.php on line 53
-----------------

:: memory_limit

Warning: Invalid argument supplied for foreach() in /app/vendor/psecio/iniscan/src/Psecio/Iniscan/Command/ShowCommand.php on line 53
-----------------

:: error_reporting

Warning: Invalid argument supplied for foreach() in /app/vendor/psecio/iniscan/src/Psecio/Iniscan/Command/ShowCommand.php on line 53
-----------------

:: display_errors

Warning: Invalid argument supplied for foreach() in /app/vendor/psecio/iniscan/src/Psecio/Iniscan/Command/ShowCommand.php on line 53
-----------------
@enygma
Copy link
Member

enygma commented Apr 20, 2016

Would it be possible to see an example of how your php.ini file is set up? That section is relying on the result of the parse_ini_file and assuming a certain default structure to the results. I'm wondering if your configuration setup is tripping it up.

@sandrokeil
Copy link
Author

The $ini variable contains the following array for the config above.

Array
(
    [date.timezone] => Europe/Berlin
    [memory_limit] => -1
    [error_reporting] => 32767
    [display_errors] => 1
)

A solution would be to add a is_array() check here.

@emilva
Copy link

emilva commented Oct 13, 2016

Cannot reproduce this using PHP 5.5.36 and the ini-file provided in the issue description

@spelcaster
Copy link

Follow #109

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

No branches or pull requests

4 participants