matomo-org / component-ini

Read and write INI configurations.
GNU Lesser General Public License v3.0
50 stars 25 forks source link

Don't use rawValues if raw scanner fails to parse the ini file #14

Closed skizzerz closed 4 years ago

skizzerz commented 4 years ago

In some cases (such as when the ini file contains multi-line strings), parse_ini_file with the INI_SCANNER_RAW flag causes the parse to fail. This in turn leads to a lot of noise in error logs because the subsequent call to decode throws a lot of E_NOTICEs. If the parse fails, just use what was processed by parse_ini_file directly instead.

See matomo-org/matomo#15689 for additional context.

tsteur commented 4 years ago

Thanks @sikzzers