Skip to content

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

Open

Description

@sandrokeil

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
-----------------

Activity

  1. enygma commented on Apr 20, 2016

    @enygma
    Member

    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.

  2. sandrokeil commented on Apr 21, 2016

    @sandrokeil
    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.

  3. emilva commented on Oct 13, 2016

    @emilva

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

  4. spelcaster commented on Oct 17, 2017

    @spelcaster

    Follow #109

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions