Uninitialized string offset helpers/css-parser.php on line 110 - Forum | JoomShaper
Staff replied SP Page Builder

Uninitialized string offset helpers/css-parser.php on line 110

Asked by Geoffrey Smith 3 years ago Last activity 3 years ago

I have an error log file filled with the following error/warning

Uninitialized string offset helpers/css-parser.php on line 110

Line 110 has the following text

109 }
110 $c = $code[$idx];
111 $idx++;

Can you please help. I'm running the latest version of joomla and spb4

2 replies

‏‏‎ ‎J‏‏‎‎e‏‎‏‏‎‎n‏‏‎‎s W.‏‏‎

Hello Geoffrey,

hope you had a good start into the new Year.
To prevent this Warning, you can add a query.

if( array_key_exists($idx,$code) ){
    $c = $code[$idx];
}

This query will check, if the offset exists and will only then acces the array offset.
Be aware, this could also be intentional by the developer to clear $c with null if the offset is missing.
I am writing this from my laptop and could not check the hole sourcecode.

Have a nice day.

Mehtaz Afsana Borsha Staff

Hi

Thanks for contacting us. You can follow Jens instructions.

-Regards.

Log in to reply.