Re: com php-src: Promote warnings to errors instr_repeat(): ext/mbstring/tests/bug73646.phpt ext/opcache/tests/bug70207.phptext/standard/string.c
ext/standard/tests/strings/str_repeat.phpt ext/standard/tests/strings/str_repeat_variation1.phpt
| From: | Christoph M. Becker | Date: | Fri, 23 Aug 2019 20:58:31 +0000 |
| Subject: | Re: com php-src: Promote warnings to errors instr_repeat(): ext/mbstring/tests/bug73646.phpt ext/opcache/tests/bug70207.phptext/standard/string.c ext/standard/tests/strings/str_repeat.phpt ext/standard/tests/strings/str_repeat_variation1.phpt |
||
| References: | 1 2 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-108023@lists.php.net to get a copy of this message | ||
On 23.08.2019 at 20:31, Peter Cowburn wrote:
> On Fri, 23 Aug 2019 at 19:02, George Peter Banyard <girgias@php.net> wrote:
>
>> Commit: 1059e3dc39b65719c414ec0f31f65a77192034ab
>> Author: George Peter Banyard <girgias@php.net> Thu, 22 Aug
>> 2019 11:28:22 +0200
>> Parents: bba7f38c4f8cbdbac391739b0fc905aaa8a09ce9
>> Branches: master
>>
>> Link:
>>
>> http://git.php.net/?p=php-src.git;a=commitdiff;h=1059e3dc39b65719c414ec0f31f65a77192034ab
>>
>> Log:
>> Promote warnings to errors in str_repeat()
>>
>> Changed paths:
>> M ext/mbstring/tests/bug73646.phpt
>> M ext/opcache/tests/bug70207.phpt
>> M ext/standard/string.c
>> M ext/standard/tests/strings/str_repeat.phpt
>> A ext/standard/tests/strings/str_repeat_variation1.phpt
>>
>>
>> Diff:
>> diff --git a/ext/mbstring/tests/bug73646.phpt
>> b/ext/mbstring/tests/bug73646.phpt
>> index 7ac824d..ea57017 100644
>> --- a/ext/mbstring/tests/bug73646.phpt
>> +++ b/ext/mbstring/tests/bug73646.phpt
>> @@ -7,10 +7,7 @@ if (!function_exists('mb_ereg')) die('skip mbregex
>> support not available');
>> ?>
>> --FILE--
>> <?php
>> -
>> -$v1=str_repeat("#", -1);
>> -var_dump(mb_ereg_search_init($v1));
>> +var_dump(mb_ereg_search_init(NULL));
>>
>
> This no longer repeats the scenario in the original bug.
The original test case was overkill. str_repeat($whatever, -1) returns
NULL, and that was the problem. The test could have been written like
this in the first place.
--
Christoph M. Becker