diff options
author | Anatol Belski <ab@php.net> | 2018-09-17 09:48:33 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2018-09-17 10:56:50 +0200 |
commit | 321c0cc3493998f731f0666127c093eff4e119eb (patch) | |
tree | 166b14619222863274ad150ec81b31d548fcc3c1 /main/php_ini.c | |
parent | 3b475910d69a5bcddaf0b78aa29fdea2e0057d31 (diff) | |
download | php-git-321c0cc3493998f731f0666127c093eff4e119eb.tar.gz |
Fix localized error messages and memory leaks
The FormatMessage API needs to LocalFree the delivered error messages.
In cases where messages are delivered in non ASCII compatible encoding,
the messages might be unreadable. This aligns the error message encoding
with the encoding settings in PHP, the focus is UTF-8 as default.
Initialize error buffer
Avoid code duplication
Diffstat (limited to 'main/php_ini.c')
-rw-r--r-- | main/php_ini.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/main/php_ini.c b/main/php_ini.c index 24c3cdd5c5..c01eef9851 100644 --- a/main/php_ini.c +++ b/main/php_ini.c @@ -29,6 +29,7 @@ #include "php_scandir.h" #ifdef PHP_WIN32 #include "win32/php_registry.h" +#include "win32/winutil.h" #endif #if HAVE_SCANDIR && HAVE_ALPHASORT && HAVE_DIRENT_H |