Bug #80872 [Com]: TypeError: str_replace(): Argument #2 ($replace) must be of type array|string,

From: Date: Tue, 16 Mar 2021 11:09:39 +0000
Subject: Bug #80872 [Com]: TypeError: str_replace(): Argument #2 ($replace) must be of type array|string,
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-232768@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80872&edit=1 ID: 80872 Comment by: fgfgfg dot hjhjhjhj at ghghgh dot fg Reported by: fgfgfg dot hjhjhjhj at ghghgh dot fg Summary: TypeError: str_replace(): Argument #2 ($replace) must be of type array|string, Status: Wont fix Type: Bug Package: Scripting Engine problem PHP Version: 8.0.3 Block user comment: N Private report: N New Comment: and why won't you fix it? it's completly uncommon introducing breaking changes of that category without any warning in the version before and it don't speed up moving the world to php8 Previous Comments: ------------------------------------------------------------------------ [2021-03-16 11:02:01] fgfgfg dot hjhjhjhj at ghghgh dot fg Description: ------------ while i *fully* support the intention it's a no-go that automated tests running with 7.2-7.4 don't throw any warning or notice and 8.0 leads to an exception that will be a bresking change in production instead while running 7.4 over months you just add (string) in front and you are done (example: value is coming from a database instead a form-submit and so is 'int' instead 'string' which is they case here) TypeError: str_replace(): Argument #2 ($replace) must be of type array|string, int given ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80872&edit=1

« previous php.bugs (#232768) next »