Uninitialized String Offset Helpers/css-parser.php On Line 110 - Question | JoomShaper

Uninitialized String Offset Helpers/css-parser.php On Line 110

Geoffrey Smith

Geoffrey Smith

SP Page Builder 1 year 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

0
2 Answers
‏‏‎ ‎J‏‏‎‎e‏‎‏‏‎‎n‏‏‎‎s W.‏‏‎
‏‏‎ ‎J‏‏‎‎e‏‎‏‏‎‎n‏‏‎‎s W.‏‏‎
Accepted Answer
1 year ago #102429

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.

0
Mehtaz Afsana Borsha
Mehtaz Afsana Borsha
Accepted Answer
Support Agent 1 year ago #102898

Hi

Thanks for contacting us. You can follow Jens instructions.

-Regards.

0