1
Daethian
Fatal Error: call to a member function and undefined variable in Smart Media
  • 2008/2/12 21:24

  • Daethian

  • Quite a regular

  • Posts: 305

  • Since: 2005/3/4 1


Fatal error: Call to a member function getClipsFromAdmin() on a non-object in /home/crabstrt/public_html/xoops/modules/smartmedia/blocks/clips_recent.php on line 22

Line 22 reads:
Quote:
$clipsArray =& $smartmedia_clip_handler->getClipsFromAdmin(0, $max_clips, 'clips.created_date', 'DESC', 'all');


All errors (2) queries (31) blocks (10) extra (0) timers (4)
Errors

Notice: Constant _MI_VERSION already defined in file /modules/formulaire/language/english/modinfo.php line 46

Line 26 reads:
Quote:
define("_MI_FORMULAIRE_DELIMETER_SPACE","White space");


Notice: Undefined variable: smartmedia_clip_handler in file /modules/smartmedia/blocks/clips_recent.php line 22
hhttp://www.artfire.com/daethian
My Artfire store- Vintage Jewelry and New Bead Jewelry

2
Dannomite82
Re: Fatal Error: call to a member function and undefined variable in Smart Media
  • 2011/3/30 17:20

  • Dannomite82

  • Just popping in

  • Posts: 2

  • Since: 2010/10/22


A few years later, but in case someone else is still troubleshooting this:

Adding
Quote:
global $smartmedia_clip_handler

above the line in question, fixes the error, but it's still broken. Basically, your version of php wasn't seeing $smartmedia_clip_handler as defined for whatever reason.

Upon getting my hands dirty, I also found out that the function in question is incomplete. It never returns a value.

Adding

Quote:
$result = $this->_db->query($sql);
while ($myrow = $this->_db->fetchArray($result)) {
$ret[] = $myrow;
}
return $ret;


to

Quote:
function &getClipsFromAdmin($start=0, $limit=0, $sort='clipid', $order='ASC', $languagesel) in smartmedia/classes/clip.php

should fix it.

Login

Who's Online

485 user(s) are online (371 user(s) are browsing Support Forums)


Members: 0


Guests: 485


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits