vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Error message after using advanced editor (https://vborg.vbsupport.ru/showthread.php?t=316903)

Lynne 01-25-2015 05:18 PM

Quote:

Originally Posted by nerbert (Post 2534450)
I'm going to be upgrading to 4.2.3 soon and I want all errors, warnings, and notices enabled AND I want to fix any code that generates them.

If you upgrade to 4.2.3, the warnings will be suppressed again.

nerbert 01-25-2015 05:21 PM

Quote:

Originally Posted by Lynne (Post 2534523)
If you upgrade to 4.2.3, the warnings will be suppressed again.

But is it just the lines in config.php that do it or is there some other setting somewhere else?

Lynne 01-25-2015 05:40 PM

Paul would be able to answer that question since he was the one who upgraded the software.

squidsk 01-26-2015 07:13 PM

Quote:

Originally Posted by nerbert (Post 2534404)
Here's the offending code :

Code:

                if (!$vbulletin->GPC['advanced'])
                {
                        if ($vbulletin->GPC_exists['emailupdate'])
                        {
                                $edit['emailupdate'] =& $vbulletin->GPC['emailupdate'];
                        }
                        else
                        {
                                $edit['emailupdate'] = array_pop($array = array_keys(fetch_emailchecked($threadinfo)));
                        }
                        if ($vbulletin->GPC_exists['htmlstate'] AND $foruminfo['allowhtml'])
                        {
                                $edit['htmlstate'] = array_pop($array = array_keys(fetch_htmlchecked($vbulletin->GPC['htmlstate'])));
                        }
                }

It looks obvious to me that you should simply edit out "$array = ". Tried that but it didn't get rid of the warning. Does anyone know what the problem is with that line?

You need to pull out the $array = . . . onto its own line and then pass $array into the function that will clear the error.

Note: You'll have to do that for the if statement as well. This is a php conflict with vb, not sure if that one is on the list of conflicts fixed in 4.2.3 or not.

Code:

                if (!$vbulletin->GPC['advanced'])
                {
                        if ($vbulletin->GPC_exists['emailupdate'])
                        {
                                $edit['emailupdate'] =& $vbulletin->GPC['emailupdate'];
                        }
                        else
                        {
                                $array = array_keys(fetch_emailchecked($threadinfo));
                                $edit['emailupdate'] = array_pop($array);
                        }
                        if ($vbulletin->GPC_exists['htmlstate'] AND $foruminfo['allowhtml'])
                        {
                                $edit['htmlstate'] = array_pop($array = array_keys(fetch_htmlchecked($vbulletin->GPC['htmlstate'])));
                        }
                }


nerbert 01-26-2015 09:10 PM

See Post #6. I did the same thing but kept both statements on the same line to preserve the original line numbering. Same goes for the contents of the next conditional.

squidsk 01-26-2015 09:41 PM

Quote:

Originally Posted by nerbert (Post 2534726)
See Post #6. I did the same thing but kept both statements on the same line to preserve the original line numbering. Same goes for the contents of the next conditional.

Goes to show that eyes see what they want and not what's really there.


All times are GMT. The time now is 01:42 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.01141 seconds
  • Memory Usage 1,736KB
  • 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
  • (2)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete