• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 3.x Series
    • Bug
    • Auto Link Fatal Error

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: Auto Link Fatal Error

    • Issue Tools
      • View Changes
    1. issueid=164 August 8, 2008 12:37 PM
      pegasus pegasus is offline
      VaultWiki Team
      Auto Link Fatal Error
      It's back.

      The fatal error we have grown to hate is back, and it looks like it's happening more frequently than ever. At least I can reproduce it now.
    Issue Details
    Issue Number 164
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category BB-Code Parsing
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 2.0.0
    Fixed Version 2.0.1
    Milestone (none)
    Software DependencyAny
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. August 8, 2008 12:49 PM
      pegasus pegasus is offline
      VaultWiki Team
      Fixed. This requires a replacement of lines 260 - 277.
      PHP Code:
                  if (get_class($parser) != 'vB_WikiCodeParser')
                  {
                      if (!
      is_string($parser->tag_list['no_option'][$parser->current_tag['name']]['external_callback']))
                      {
                          
      trigger_error('AutoLink String tag: ' . $parser->current_tag['name'] . '; ' . $parser->tag_list['no_option'][$parser->current_tag['name']]['external_callback'] . '; page = ' . $_SERVER['REQUEST_URI'], E_USER_NOTICE);
                      }

                      return 
      $parser->tag_list['no_option'][$parser->current_tag['name']]['external_callback']($parser, $text);
                  }
                  else
                  {
                      if (!
      is_string($parser->tag_list['bbcode']['no_option'][$parser->current_tag['name']]['external_callback']))
                      {
                          
      trigger_error('AutoLink String tag: ' . $parser->current_tag['name'] . '; ' . $parser->tag_list['bbcode']['no_option'][$parser->current_tag['name']]['external_callback'] . '; page = ' . $_SERVER['REQUEST_URI'], E_USER_NOTICE);
                      }

                      return 
      $parser->tag_list['bbcode']['no_option'][$parser->current_tag['name']]['external_callback']($parser, $text);
                  } 
      Replace with:
      PHP Code:
                  return $parser->tag_list['no_option'][$parser->current_tag['name']]['external_callback']($parser, $text); 
      I guess I should explain why this works. In PHP4, get_class always returns a lowercase string, instead of the exact class name. This means that the cycle-less version of the tag list would always be used. This is why the error had been occurring before.

      On top of this, in PHP5, get_class would return the expected class name, so we would use the correct cycled version of the tag list. However, since 2.0.0, only the cycle-less version is accessible by the vBulletinHook class.

      So if we modify the function to always use the same version of the tag list, we can avoid these problems altogether.
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 9:03 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2023 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2023 DragonByte Technologies Ltd.
    Copyright © 2008 - 2013 VaultWiki Team, Cracked Egg Studios, LLC.