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.