Bug #80872 [NEW]: TypeError: str_replace(): Argument #2 ($replace) must be of type array|string,
| From: | fgfgfg dot hjhjhjhj at ghghgh dot fg | Date: | Tue, 16 Mar 2021 11:02:01 +0000 |
| Subject: | Bug #80872 [NEW]: TypeError: str_replace(): Argument #2 ($replace) must be of type array|string, | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-232766@lists.php.net to get a copy of this message | ||
From: fgfgfg dot hjhjhjhj at ghghgh dot fg
Operating system:
PHP version: 8.0.3
Package: Scripting Engine problem
Bug Type: Bug
Bug description:TypeError: str_replace(): Argument #2 ($replace) must be of type array|string,
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 bug report at https://bugs.php.net/bug.php?id=80872&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80872&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80872&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80872&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80872&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80872&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80872&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80872&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80872&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80872&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80872&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80872&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80872&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80872&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80872&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80872&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80872&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80872&r=mysqlcfg