0

I am getting this error,while setting up an existing project.I had cloned and done composer install.[php version is 7.2,cakephp version is 3.9]Now, when I am trying to open the site,It is showing following errors:


  • Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /var/www/html/book/vendor/cakephp/cakephp/src/Utility/Text.php on line 232
  • Warning (512): Unable to emit headers. Headers sent in file=/var/www/html/book/vendor/cakephp/cakephp/src/Core/ObjectRegistry.php line=40 [CORE/src/Http/ResponseEmitter.php, line 53]

Can anyone help to fix this?

hakre
  • 193,403
  • 52
  • 435
  • 836
Vishnu kk
  • 1
  • 2
  • Find out how `str_replace()` could receive a NULL parameter and prevent it. – KIKO Software Nov 01 '22 at 07:17
  • It seems that you have used a variable that contains `null` to your `str_replace()` call on line 232. The second error is a result of the first error. Since the error message has been "echoed" already it's too late to send any HTTP headers – Gowire Nov 01 '22 at 07:19

0 Answers0