vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   An error that I can't make sense of... (https://vborg.vbsupport.ru/showthread.php?t=108831)

Rimer dal 02-25-2006 03:44 AM

An error that I can't make sense of...
 
I am working on porting and updating a mod for my forum, but in the process I ran into an error that I don't recall ever seeing before.

Fatal error: Call to a member function on a non-object in /includes/functions_newpost.php on line 35

This is the code I have, the line it marks as erroring I surrounded with -| |- so it would be a little more visible. If anyone has an idea as to why I am getting this error, please help me. It might be that I am making a stupid error and I am just not seeing it...

Code:

function fetch_private_thread(&$post)
{

        global $vBulletin;
       
        if (($post['privatethread'] >= 1 || $post['privatethread'] <= 4) && $post['privateusers'])
        {
                // get the box data properly formatted
                $privateusers = preg_split('/(?<!&#[0-9]{3}|&#[0-9]{4}|&#[0-9]{5});/', $post['privateusers'], -1, PREG_SPLIT_NO_EMPTY);                       
                foreach($privateusers as $privateusername)
                {
                      -|$privateuserarray[] = $vBulletin->db->escape_string(htmlspecialchars_uni($privateusername));  |-                             
                }

Thank you
-Rimer-

Problem fixed, global had a capital letter 'B' which php being case sensitive got angry at me for. Problem fixed and well on the way to finishing my project.


All times are GMT. The time now is 10:37 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.01274 seconds
  • Memory Usage 1,708KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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