DebugQ - De:Bug:Q

Go Back   DebugQ - De:Bug:Q > DebugQ > Php/MySQL
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
Thread Tools Display Modes
  #1  
Unread 01-12-2016, 06:39 AM
Debugger Debugger is offline
Administrator
 
Join Date: Oct 2007
Posts: 936
Default PHP Warning: Illegal string offset 'tid' in

Illegal string offset 'tid'


[12-Jan-2016 02:16:48 UTC] PHP Warning: Illegal string offset 'tid' in /home/xxx/public_html/sources/Topics.php on line 95


   

Reply With Quote
  #2  
Unread 01-12-2016, 06:42 AM
Debugger Debugger is offline
Administrator
 
Join Date: Oct 2007
Posts: 936
Default

The error Illegal string offset 'whatever' in... generally means:

you're trying to use a string as a full array.


   

Reply With Quote
  #3  
Unread 01-12-2016, 06:43 AM
Debugger Debugger is offline
Administrator
 
Join Date: Oct 2007
Posts: 936
Default

for example:

$fruit_counts = array('apples'=>2, 'oranges'=>5, 'pears'=>0);
echo $fruit_counts['oranges']; // echoes 5

$fruit_counts = "an unexpected string assignment";
echo $fruit_counts['oranges']; // causes illegal string offset error


   

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump


All times are GMT. The time now is 07:06 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
DebugQ - Debug Quote - De:Bug:Q