#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    1
    Rep Power
    0

    Nailing down 2 fatal error


    Hello all folks..



    1) Error 1

    Source File : ...../ /controllers/perfume_work.php
    Line : 99

    Error string: Call to a member function get_attribute() on a non-object

    // no direct access
    defined('_JEXEC') or die('Restricted access');

    // Include the syndicate functions only once
    require_once (dirname(__FILE__).DS.'helper.php');

    $params->def('greeting', 1);

    $type = modLoginyHelper::getType();
    $return = modLoginyHelper::getReturnURL($params, $type);

    $user =& JFactory::getUser();

    require(JModuleHelper::getLayoutPath('mod_loginy'));
    Last edited by ricardo777; December 19th, 2012 at 10:53 PM. Reason: reason isvvbbb nnn
  2. #2
  3. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,957
    Rep Power
    1046
    Hi,

    yeah, the first method obviously suffers from not checking if there even are session values. But apart from fixing the error, you should also check if the object actually makes sense in case there is no session. Obviously it depends on it.

    Regarding the second method:

    You have to look up the beautifully named "perf_es_v1_get_cpPerfumeservicebycuid" method. That's where the error originally comes from. The code you posted just reacts to this error.

IMN logo majestic logo threadwatch logo seochat tools logo