vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   This makes no sense to me (https://vborg.vbsupport.ru/showthread.php?t=70171)

amykhar 10-04-2004 11:26 AM

This makes no sense to me
 
How could some people be seeing a warning (Warning: Invalid argument supplied for foreach() in /home/eaforums/public_html/forums/misc.php on line 229
)
on this page:
http://www.eaforums.com/forums/misc.php?do=getfavsmilie

and not other users?



I have tested on two operating systems, numerous browsers and two separate computers but am not seeing the warning. Shouldn't a php warning apply to everyone?

The line of code in question is:

Code:

  foreach ($nabn AS $favsmilie)
I know this error DID happen when I originally uploaded the file yesterday because I had
$nabn and $favsmilie reversed. But, I fixed it and everything is running fine for me. The one user swears she cleared her cache. I could understand problems if they were reaching a different line of code, or javascript errors or display errors. But how are they selectively getting warnings on what seems to be a valid line of code?



Amy

Dean C 10-04-2004 11:31 AM

I'm guessing this is a modification where uses can have an organized collection of their favorite smilies? Are you storing the ids of these smilies in a list in your database and then exploding them? If users have no favorite smilies then it won't be an array. Just a thought based on what you have to show :)

amykhar 10-04-2004 01:43 PM

Quote:

Originally Posted by Dean C
I'm guessing this is a modification where uses can have an organized collection of their favorite smilies? Are you storing the ids of these smilies in a list in your database and then exploding them? If users have no favorite smilies then it won't be an array. Just a thought based on what you have to show :)

Doh! I had an if clause around it when I was first working but must have deleted it. Good catch Dean!

Amy

Dean C 10-04-2004 01:54 PM

You're welcome :)


All times are GMT. The time now is 01:53 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00933 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete