Status
Not open for further replies.

Mick

Customer
Hi Mokonzi,

Found this little error in my php-error logs.

As said in another thread this might be something to do with my site, but thought I would report it :)

Code:
Call to a member function query_first() on a non-object in /**********/forum/dbtech/classifieds_pro/hooks/notifications_list.php on line 7

PHP:
<?php

if (CLASSIFIEDS::$permissions['canmoderate'])
{
	global $db;
	// Grab the amount of listings that are currently awaiting approval
	$listingscount = $db->query_first("
		SELECT
			COUNT(*) AS count
		FROM " . TABLE_PREFIX . "dbtech_classifieds_listing AS l
		WHERE l.moderated = 1
		AND l.ended != 1
		AND l.cancelled != 1
	");
	
	if ($listingscount['count'])
	{
		global $classifiedsmoderatecount;
		$classifiedsmoderatecount = $listingscount['count'];
		if ($vbulletin->options['dbtech_classifieds_notifications'])
		{
			$notifications['dbtech_classifieds_moderated_alertcount'] = array(
				'phrase' => $vbphrase['dbtech_classifieds_listings_to_approve_alerts'],
				'link'   => $vbulletin->options['bburl'] . '/dbtclassifieds.php?' . $vbulletin->session->vars['sessionurl'] . 'do=moderate&action=moderationqueue.php',
				'order'  => 500
			);
		}
	}
}

?>

LINE 7:
$listingscount = $db->query_first("

Lol just guessing should that be $vbulletin->$db

Just going on previous issues that I had with a tiny mod I wrote ???

Mick
 
Not always... but you might be right in this instance. I'll check it out... when I was first coding that bit it didn't like $vbulletin->db... so I went with $db... :D

btw, does that error repeat regularly in your logs?
 
Thanks matey. Do you know what the date of the error was? :)

Sorry I put the log back to 0 as I had quite a few errors and wanted a clean file.

However got one today (recent).

[01-Feb-2014 14:19:38 UTC] PHP Fatal error: Call to a member function query_first() on a non-object in /***********/dbtech/classifieds_pro/hooks/notifications_list.php on line 7
 
Status
Not open for further replies.

Legacy DragonByte Classifieds

vBulletin 4.x.x
Seller
Mokonzi
Release date
Last update
Total downloads
562
Customer rating
0.00 star(s) 0 ratings
Back
Top