We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

illegal string | Forum

Topic location: Forum home » Support » General Questions
OW-Ghost
OW-Ghost Aug 31 '19
i get error in my oxwall error log all the time


[Mon Aug 26 22:26:26 2019] [ow_core_log] [Warning] Message: Illegal string offset 'label' File: /var/www/html/ow_smarty/template_c/72123f5aa239cd4d8e866aa400be9453d854adec_0.file.box_toolbar.html.php Line:50


How can i fix this?

OW-Ghost
OW-Ghost Aug 31 '19
Code on line 50:


   <?php echo $_smarty_tpl->tpl_vars['item']->value['label'];?>


The Forum post is edited by OW-Ghost Aug 31 '19
dave Leader
dave Sep 1 '19
Its not an error its a warning, probably cause by an empty variable.  Meaning that at times for some reason value['label'] part of the object is empty or null and so it cant echo (display) anything and gives the warning. 


Not sure of a fix at the moment. 


You could try removing everything from the ow_smarty/template_c  folder and let oxwall rebuild it. 


The Forum post is edited by dave Sep 1 '19
OW-Ghost
OW-Ghost Sep 1 '19
you can remove everything from ow_smarty/template_c ? i never done that...but i guess it is 100% safe to do and i will give it a try


thanks

OW-Ghost
OW-Ghost Sep 1 '19
did delete the files in ow_smarty/template_c 


and created a new error.log file


keep you updated if it was working...

dave Leader
dave Sep 1 '19
OK :)
OW-Ghost
OW-Ghost Sep 1 '19

Update:


Same "warning" shows up in the oxwall error log


Not sure how to solve it...hmmm

The Forum post is edited by OW-Ghost Sep 1 '19
dave Leader
dave Sep 1 '19
You are running third party oxwall correct, you have to ask them i guess as they did changes to oxwall core. 
AppXprt
AppXprt Jan 10 '20
So a solution would be to check if it's is_null() || empty()

before trying to display it

The Forum post is edited by AppXprt Jan 10 '20