com php-src: Fix php 8.0's opcache flags for pathinfo(): ext/opcache/Optimizer/zend_func_info.c ext/standard/str ing.c

From: Date: Tue, 11 Jun 2019 07:09:50 +0000
Subject: com php-src: Fix php 8.0's opcache flags for pathinfo(): ext/opcache/Optimizer/zend_func_info.c ext/standard/str ing.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-106646@lists.php.net to get a copy of this message
Commit: cdc82f19d8b6dc72f74abb819eab24589e3aa489 Author: Tyson Andre <tysonandre775@hotmail.com> Sun, 9 Jun 2019 16:55:56 -0400 Committer: Joe Watkins <krakjoe@php.net> Tue, 11 Jun 2019 09:09:50 +0200 Parents: 678e3eb0b70c01d1c17d7d28dae7994b77184268 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cdc82f19d8b6dc72f74abb819eab24589e3aa489 Log: Fix php 8.0's opcache flags for pathinfo() See https://php.net/pathinfo This fixes a bug introduced in the cleanup for commit 0d79c70cf3c10f60a2e8fbfd68903d8716b7b43c pathinfo($str, PATHINFO_EXTENSION) will always return a string (if there is no extension, the function returns the empty string) Changed paths: M ext/opcache/Optimizer/zend_func_info.c M ext/standard/string.c Diff: diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index 55a6aa1..1485c0a 100644 --- a/ext/opcache/Optimizer/zend_func_info.c +++ b/ext/opcache/Optimizer/zend_func_info.c @@ -194,7 +194,7 @@ static const func_info_t func_infos[] = { FN("nl2br", MAY_BE_STRING), F1("basename", MAY_BE_STRING), F1("dirname", MAY_BE_NULL | MAY_BE_STRING), - F1("pathinfo", MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING), + F1("pathinfo", MAY_BE_STRING | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_STRING | MAY_BE_ARRAY_OF_STRING), F1("stripslashes", MAY_BE_STRING), F1("stripcslashes", MAY_BE_STRING), F1("strstr", MAY_BE_FALSE | MAY_BE_STRING), diff --git a/ext/standard/string.c b/ext/standard/string.c index 8fb2569..5c56bb4 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1666,7 +1666,7 @@ PHP_FUNCTION(dirname) } /* }}} */ -/* {{{ proto array pathinfo(string path[, int options]) +/* {{{ proto array|string pathinfo(string path[, int options]) Returns information about a certain string */ PHP_FUNCTION(pathinfo) {

« previous php.cvs (#106646) next »