CodeIgniter Forums
[SOLVED] View parser - Undefined array key 'fraction' - Printable Version

+- CodeIgniter Forums (
+-- Forum: CodeIgniter 4 (
+--- Forum: CodeIgniter 4 Support (
+--- Thread: [SOLVED] View parser - Undefined array key 'fraction' (/showthread.php?tid=86205)

[SOLVED] View parser - Undefined array key 'fraction' - superior - 01-20-2023


I'm working with the view parser, i've tried to use the Filter `local_currency` (does not have fractions?) and `local_number`.
On enabling `local_number` like this '{ subtotal|local_number(currency,2,en_US) }' a error generated as shown below.

> Seems like a bug to me, reported it on Github.
> Checked again: the documentation is missing it accepts a third parameter: `{ price|local_currency(eur,nl_NL,2) }`
> Issue remains if you don't set the third parameter, deprecated error is thrown that null value isn't allowed.

Another issue with view path
Normally with with views you are allowed to setup sub-folders for example:  App\Modules\Name\Views\file.php
Is this a normal behaviour or do you have different options to do this with the setData()?

> View path has been found, there's an option on initialize the parser class.
> Also not to be found in the documentation, correct me if i'm wrong.

CodeIgniter 4.3.1
PHP 8.0.14

Is this a mistake from my side for not understanding the arguments or is this a bug?
[Image: error.png]

RE: View parser - Undefined array key 'fraction' - superior - 01-21-2023

@kenjis thank you for the solution, this topic is marked as solved!