CodeIgniter Forums
Undefined function esc() in v4.5.8 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9)
+--- Thread: Undefined function esc() in v4.5.8 (/showthread.php?tid=92572)



Undefined function esc() in v4.5.8 - cadgiru - 03-10-2025

with:
Code:
<title><?= esc($title ?? 'Default Title') ?></title>
get error after upgrading:
Code:
PHP Fatal error:  Uncaught Error: Call to undefined function esc() in /var/www/mvc/xa/app/Views/templates/xaHeader.php:7
Stack trace:
#0 {main}
  thrown in /var/www/mvc/xa/app/Views/templates/xaHeader.php on line 7
Any ideas why?



RE: 4.6.8 esc - ozornick - 03-10-2025

You have updated incorrectly. The function should work correctly. Can you repeat the upgrade step by step or move your code to a clean install?
https://codeigniter4.github.io/userguide/installation/upgrading.html
And please specify the version, 4.6.8 does not exist.


RE: 4.6.8 esc - cadgiru - 03-10-2025

(03-10-2025, 04:51 AM)ozornick Wrote: You have updated incorrectly. The function should work correctly. Can you repeat the upgrade step by step or move your code to a clean install?
https://codeigniter4.github.io/userguide/installation/upgrading.html
And please specify the version, 4.6.8 does not exist.

thanks