com php-src: Merge branch 'PHP-7.3' into PHP-7.4: NEWS ext/readline/readline_cli.c

From: Date: Fri, 23 Aug 2019 12:04:31 +0000
Subject: com php-src: Merge branch 'PHP-7.3' into PHP-7.4: NEWS ext/readline/readline_cli.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-108005@lists.php.net to get a copy of this message
Commit: 514be3ff8723628058afd70f75f2501b1797cccf Author: Christoph M. Becker <cmbecker69@gmx.de> Fri, 23 Aug 2019 14:02:48 +0200 Parents: eeb910911d914ca44271e9dbd2def5dadb466528 03c7749dc8f40df8f41afffcdef4595ad43afe7f Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=514be3ff8723628058afd70f75f2501b1797cccf Log: Merge branch 'PHP-7.3' into PHP-7.4 * PHP-7.3: Fix #77812: Interactive mode does not support PHP 7.3-style heredoc Bugs: https://bugs.php.net/77812 Changed paths: MM NEWS MM ext/readline/readline_cli.c Diff: diff --cc NEWS index c781ff7,0e6efd7..8fa0367 --- a/NEWS +++ b/NEWS @@@ -1,27 -1,19 +1,29 @@@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 7.3.10 +?? ??? ????, PHP 7.4.0RC1 - Core: - . Fixed bug #78220 (Can't access OneDrive folder). (cmb, ab) - . Fixed bug #77922 (Double release of doc comment on inherited shadow - property). (Nikita) - . Fixed bug #78441 (Parse error due to heredoc identifier followed by digit). - (cmb) + . Fixed bug #77812 (Interactive mode does not support PHP 7.3-style heredoc). + (cmb, Nikita) + . Fixed bug #78438 (Corruption when __unserializing deeply nested structures). + (cmb, Nikita) + . Fixed bug #78441 (Parse error due to heredoc identifier followed by digit). + (cmb) -- Intl: - . Ensure IDNA2003 rules are used with idn_to_ascii() and idn_to_utf8() - when requested. (Sara) +22 Aug 2019, PHP 7.4.0beta4 + +- Core: + . Fixed bug #78220 (Can't access OneDrive folder). (cmb, ab) + . Fixed bug #78396 (Second file_put_contents in Shutdown hangs script). + (Nikita) + . Fixed bug #78406 (Broken file includes with user-defined stream filters). + (Nikita) + . Fixed bug #72530 (Use After Free in GC with Certain Destructors). (Nikita) + . Fixed bug #78386 (fstat mode has unexpected value on PHP 7.4). (cmb) + +- Date: + . Fixed bug #78383 (Casting a DateTime to array no longer returns its + properties). (Nikita) - MySQLnd: . Fixed connect_attr issues and added the _server_host connection attribute. diff --cc ext/readline/readline_cli.c index c533fc2,6e6e916..d7d96b5 --- a/ext/readline/readline_cli.c +++ b/ext/readline/readline_cli.c @@@ -350,12 -347,14 +350,15 @@@ static int cli_is_valid_code(char *code } break; case heredoc: + ZEND_ASSERT(heredoc_tag); - if (code[i - (heredoc_len + 1)] == '\n' && !strncmp(code + i - heredoc_len, heredoc_tag, heredoc_len) && code[i] == '\n') { - code_type = body; - } else if (code[i - (heredoc_len + 2)] == '\n' && !strncmp(code + i - heredoc_len - 1, heredoc_tag, heredoc_len) && code[i-1] == ';' && code[i] == '\n') { + if (!strncmp(code + i - heredoc_len + 1, heredoc_tag, heredoc_len)) { + unsigned char c = code[i + 1]; + char *p = code + i - heredoc_len; + + if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '_' || c >= 0x80) break; + while (*p == ' ' || *p == '\t') p--; + if (*p != '\n') break; code_type = body; - valid_end = 1; } break; case outside:

« previous php.cvs (#108005) next »