Skip to content

Commit 6da3a1e

Browse files
committed
Revert "Implement #67331: Have parse_ini_file add empty entries"
This reverts commit 3f3e914. The commit broke some tests on Windows, and generally needs more though.
1 parent 3f3e914 commit 6da3a1e

File tree

8 files changed

+1520
-1708
lines changed

8 files changed

+1520
-1708
lines changed

NEWS

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 7.4.0alpha1
44

5-
- Core:
6-
. Implemented request #67331 (Have parse_ini_file add empty entries). (cmb)
7-
85
- Intl:
96
. Lifted requirements to ICU ≥ 50.1. (cmb)
107
. Changed default of $variant parameter of idn_to_ascii() and idn_to_utf8().

UPGRADING

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,6 @@ PHP 7.4 UPGRADE NOTES
7373
11. Changes to INI File Handling
7474
========================================
7575

76-
- General:
77-
. Keys without values can now omit the equals sign, in which case they are
78-
parsed as NULL instead of an empty string.
79-
8076
========================================
8177
12. Windows Support
8278
========================================

Zend/zend_ini_parser.y

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -342,24 +342,7 @@ statement:
342342
zval_ini_dtor(&$2);
343343
zval_ini_dtor(&$5);
344344
}
345-
| TC_OFFSET option_offset ']' {
346-
zval arg2;
347-
348-
#if DEBUG_CFG_PARSER
349-
printf("OFFSET: '%s'[%s] = NULL\n", Z_STRVAL($1), Z_STRVAL($2));
350-
#endif
351-
ZVAL_NULL(&arg2);
352-
ZEND_INI_PARSER_CB(&$1, &arg2, &$2, ZEND_INI_PARSER_POP_ENTRY, ZEND_INI_PARSER_ARG);
353-
zend_string_release(Z_STR($1));
354-
zval_ini_dtor(&$2);
355-
}
356-
| TC_LABEL {
357-
zval arg2;
358-
359-
ZVAL_NULL(&arg2);
360-
ZEND_INI_PARSER_CB(&$1, &arg2, NULL, ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG);
361-
zend_string_release(Z_STR($1));
362-
}
345+
| TC_LABEL { ZEND_INI_PARSER_CB(&$1, NULL, NULL, ZEND_INI_PARSER_ENTRY, ZEND_INI_PARSER_ARG); zend_string_release(Z_STR($1)); }
363346
| END_OF_LINE
364347
;
365348

0 commit comments

Comments
 (0)