]> granicus.if.org Git - php/commit
Promote invalid case mode to ValueError in mb_case_converter
authorGeorge Peter Banyard <girgias@php.net>
Sun, 5 Apr 2020 01:33:08 +0000 (03:33 +0200)
committerGeorge Peter Banyard <girgias@php.net>
Sun, 5 Apr 2020 01:33:08 +0000 (03:33 +0200)
commit1b6f61e7c4330b0f7abcc29c80f3c94bc6d13ce5
tree7c8af8ded9fc53d47982f0f964f605bce980b67c
parenta34e73de5adf3999db66f0970da21bd0f6537595
Promote invalid case mode to ValueError in mb_case_converter

Add assertions to check the return value is not NULL as this indicates a bug.
Add identical assertion to mb_strtoupper and mb_strtolower.
This means these functions can't return false anymore, ammend stubs accordingly.
ext/mbstring/mbstring.c
ext/mbstring/mbstring.stub.php
ext/mbstring/mbstring_arginfo.h
ext/mbstring/tests/mb_convert_case_invalid_mode.phpt [deleted file]
ext/mbstring/tests/mb_convert_case_various_mode.phpt [new file with mode: 0644]