vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   PHP fatal error (https://vborg.vbsupport.ru/showthread.php?t=269898)

John Lester 09-08-2011 04:04 PM

PHP fatal error
 
This pops up in my error logs every once in awhile. I've not had any complaints about anything specific not working, nor have I been online when the error occurs.

vB.com wanted me to open a ticket and disable/uninstall all mods and upload a clean vB. I don't really want to do that since a lot of my members have neurological disorders and can't cope with change well (all the back n forth breaks some of the mods they use).

Code:

PHP Fatal error: Call to undefined function fetch_phrase() in /home2/nonyabiz/public_html/includes/functions.php on line 3518
Here's lines 3468 to 3529 (in case any of the preceding code is relevant) with 3518 in red.

Code:

// #############################################################################
/**
* Fetches an error phrase from the database and inserts values for its embedded variables
*
* @param        string        Varname of error phrase
* @param        mixed        Value of 1st variable
* @param        mixed        Value of 2nd variable
* @param        mixed        Value of Nth variable
*
* @return        string        The parsed phrase text
*/
function fetch_error()
{
        global $vbulletin;

        $args = func_get_args();

        // Allow an array of phrase and variables to be passed in as arg0 (for some internal functions)
        if (is_array($args[0]))
        {
                $args = $args[0];
        }

        if (class_exists('vBulletinHook', false))
        {
                ($hook = vBulletinHook::fetch_hook('error_fetch')) ? eval($hook) : false;
        }

        if (!function_exists('fetch_phrase') AND !VB_API)
        {
                require_once(DIR . '/includes/functions_misc.php');
        }

        if ($vbulletin->GPC['ajax'])
        {
                switch ($args[0])
                {
                        case 'invalidid':
                        case 'nopermission_loggedin':
                        case 'forumpasswordmissing':
                                $args[0] = $args[0] . '_ajax';
                }
        }

        // API only needs error phrase name and args.
        if (defined('VB_API') AND VB_API === true)
        {
                return $args;
        }

        $args[0] = fetch_phrase($args[0], 'error', '', false);
        if (sizeof($args) > 1)
        {
                return call_user_func_array('construct_phrase', $args);
        }
        else
        {
                return $args[0];
        }
}

// #############################################################################


Lynne 09-08-2011 04:18 PM

What version vb are you running? Do you have any plugins using the hook location error_fetch ?

John Lester 09-08-2011 06:55 PM

4.1.5 and I don't know if any of the plugins use that hook :( Can I find out without having to go through every line of code in every file?

Lynne 09-08-2011 09:06 PM

Just look at the Plugin Manager > look at the column where it says hook location.

John Lester 09-08-2011 10:05 PM

There are none that hook into error_fetch

Lynne 09-09-2011 01:58 AM

Are you using a language pack?

John Lester 09-09-2011 03:03 AM

No, no language packs used.

EDIT: I used winmerge to compare a clean file and the live file and they are identical. So we know nothing is wrong with the file itself.

Could a style be causing this? I do have a few styles installed.

EDIT 2: This is how long and how often this error has been occuring. As you can see it's erratic and I can't find any other errors or slow queries to correspond with the dates and times.

[21-Aug-2011 07:16:32]
[22-Aug-2011 06:54:29]
[23-Aug-2011 17:33:24]
[23-Aug-2011 17:38:54]
[24-Aug-2011 04:40:42]
[24-Aug-2011 19:32:14]
[25-Aug-2011 09:16:58]
[26-Aug-2011 12:11:21]
[29-Aug-2011 04:35:31]
[29-Aug-2011 04:35:31]
[31-Aug-2011 01:56:08]
[03-Sep-2011 22:16:53]

Lynne 09-09-2011 04:06 PM

It doesn't look like it happens very often. But, some phrase seems to be missing. I supposed your could reinstall your language file via tools.php. But, I don't know how much I would worry about an error that only happens a couple times a week.

John Lester 09-09-2011 07:25 PM

Yea I'll leave it be for now thanks Lynne :)


All times are GMT. The time now is 10:42 AM.

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.01050 seconds
  • Memory Usage 1,730KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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