![]() |
Ahh right on, I will update the package tonight but to fix it change
Code:
private $vbObj; Code:
var $vbObj; |
Quote:
|
Some follow up troubleshooting:
Broke down the query line into two parts to find out which was failing: 31: $temp = $this->vbObj->db->query_read( "SELECT status FROM recruitment WHERE class='$query'" ); 32: $result = $this->vbObj->db->fetch_array( $temp ); Failed at line 31 still (Fatal error: Call to a member function query_read() on a non-object) So thinking vbObj is borked I put in if ($this->vbObj == null) print ( "vbObj = null"); .. and got: Recruitment Druid: vbObj = null Fatal error: Call to a member function query_read() on a non-object So yeah I'm guessing the constructor didn't get called (?) or didn't return a valid object. So checking that I put in: if ($this->vbObj == null) print ( "vbObj = null"); global $vbulletin; $vbObj = $vbulletin; if ($vbObj == null) print ( "vbObj2 = null"); if ($vbulletin == null) print ( "vbulletin = null"); .. which gives me vbObj = null vbObj2 = null vbulletin = null So the problem is with the constructor not returning a valid object. Trying to figure that one out now. |
right, ima dumbass __construct is only valid in php5...
change Code:
function __construct()...... |
Please click installed. <3
|
Quote:
Code:
class recruit { Code:
class recruit { So why does this Code:
global $vbulletin; |
Ok... I missed that you updated to php5. There are a couple options ill leave you with.
I can rewrite a portion of it, and discard the built in vbulletin queries (the global object). I cannot reproduce the error, I would need some form of shell access to your site (i dont expect this, but i admit im curious on the error, would need vi class_recruit.php edit access lol). and a test page to work with. In order to get a $vbulletin object to instance, you need to include EXAMPLE.recruitStatus.php in the CMPS as a module. On the page (VBCMPS page) you are displaying this on you can set Portal Output Global Variables : vbulletin (with out the $). oh now that i think about you could try. Code:
but I have a feeling its not a constructor issue but just global $vbulletin is not instantiating the object. And that, sadly I don't think I can troubleshoot with out being able to reproduce it. (I am by no means a vb expert) Be happy to fix it and just use the mysql_xxx stuff if you like.. I'd be interested to know if the 3 ppl that clicked install had this issue and never bothered to come back or if it worked. |
I'm having similar issues.
I have PHP5 Line 19 of class_recruit.php (didn't save the error) Line 19 of EXAMPLE.edit_recruit.php (Fatal error: Call to a member function on a non-object modules/EXAMPLE.edit_recruit.php |
typo on line 19 of EXAMPLE.edit_recruit.php
the offending line is Code:
$class->getStatus('Druid'); Code:
$data->getStatus( 'Druid' ); Code:
private $vbObj; Code:
var $vbObj; |
Also, this part of the SQL is giving me errors (the red part):
CREATE TABLE `recruitment` ( `Class` varchar(15) NOT NULL default '', `Status` varchar(15) NOT NULL default '', PRIMARY KEY (`Class`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 I removed it and it went in fine. I am reinstalling the rest right now to see how it works. |
All times are GMT. The time now is 12:54 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|