php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80872 TypeError: str_replace(): Argument #2 ($replace) must be of type array|string,
Submitted: 2021-03-16 11:02 UTC Modified: 2021-03-16 11:03 UTC
From: fgfgfg dot hjhjhjhj at ghghgh dot fg Assigned:
Status: Wont fix Package: Scripting Engine problem
PHP Version: 8.0.3 OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2021-03-16 11:02 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-03-16 11:03 UTC] nikic@php.net
-Status: Open +Status: Wont fix
 [2021-03-16 11:09 UTC] fgfgfg dot hjhjhjhj at ghghgh dot fg
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
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Oct 27 23:03:35 2021 UTC