Git Product home page Git Product logo

iniparser's People

Contributors

austinhyde avatar fredpe avatar javiermarinros avatar till avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iniparser's Issues

Composer

Hey!

Can you provide your project to Packagist? And add some instructions in the documentation to install via composer?

Thanks ;)

array_key_exists deprecated in PHP7.4

Hi!
We are testing PHP7.4 and there's a deprecated feature:
https://www.php.net/manual/es/migration74.deprecated.php#migration74.deprecated.core.array-key-exists-objects

So, in our system, the line https://github.com/austinhyde/IniParser/blob/master/src/IniParser.php#L197 is throwing this error:

Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in C:\inetpub\wwwroot\intranet\3rdparty\IniParser\vendor\austinhyde\iniparser\src\IniParser.php on line 197

Our idea, to fix it without too much research would be to implement a private method:

private static function array_key_exists($key_or_property, $array_or_class) { return is_object($array_or_class) ? property_exists($array_or_class, $key_or_property) : array_key_exists($key_or_property, $array_or_class); }

and replace all the array_key_exists calls for self::array_key_exists

Thank you very much in advance for your help!

Cannot parse standard array

Warning: array_key_exists() expects parameter 2 to be array, string given in /xxxxx/IniParser.php on line 151

Fatal error: Cannot create references to/from string offsets nor overloaded objects in /xxxxxxxxx/IniParser.php on line 158

when I use good old

a[] = 1
a[] = 2
a[] = "c"

in the INI file, while parse_ini_file() has no issues with it and gives the desired result

PHP 5.4.6, Ubuntu 12.10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.