Page 1 of 1

PHP Warning: Undefined array key col.xs4.sm3.md3 in items_grid.php (Phoca Cart 6.1.1)

Posted: 22 Jun 2026, 02:50
by getulio
Hello Jan and Phoca Team,
I would like to report a minor PHP Warning found in Phoca Cart version 6.1.1 running on Joomla 5.
Error message:
Warning: Undefined array key col.xs4.sm3.md3 in /components/com_phocacart/layouts/items_grid.php on line 31

With afraid upgrade to joomla 6, despite o S.O. to be with php, mysql,... all upgraded. As well there are others extensions.
I'm analising carefully.

In this moment, I change:
(Error Reporting) do Joomla, of "Máximum" to "System Default".
The error isn't to be diplayed more, but maybe can to be corrected.

Thank you for your amazing work on this extension!

Re: PHP Warning: Undefined array key col.xs4.sm3.md3 in items_grid.php (Phoca Cart 6.1.1)

Posted: 22 Jun 2026, 14:38
by getulio
Hello, newly
The AI suggest

Replace the null coalescence operator call (??) of PHP, OR for a verification with isset(),
warrant that a default value to be assumed, if the key not exist

// Replace the problem slice for:
$coluna = isset($seuArray['col.xs4.sm3.md3']) ? $seuArray['col.xs4.sm3.md3'] : '';
// OR using the form shorter (Null Coalescing):
$coluna = $seuArray['col.xs4.sm3.md3'] ?? '';

Re: PHP Warning: Undefined array key col.xs4.sm3.md3 in items_grid.php (Phoca Cart 6.1.1)

Posted: 22 Jun 2026, 15:07
by Jan
Hi, thank you for the info, there was wrongly set default value on one place, it will be fixed in next version.

For now, go to Phoca Cart Options and just save them, it should help as right value will be set.

Jan