Error log

Discussion in 'Troubleshooting' started by csongor_simsay, Nov 3, 2014.

  1. csongor_simsay

    csongor_simsay New Member

    Joined:
    Dec 10, 2013
    Messages:
    26
    Hello,
    I have this small script below and I got the following error log:
    Call to a member function getActiveProductsExpiration() on a non-object
    I have no idea what it could mean. Can you advise, please?
    Thanks

    <?php
    require_once '/home/csongor2/public_html/amember/library/Am/Lite.php';
    require_once '/home/csongor2/public_html/amember/bootstrap.php';
    $lite = Am_Lite::getInstance();
    if(Am_Lite::getInstance()->isLoggedIn()){
    echo "&userLoggedIn=1";
    } else {

    echo "&userLoggedIn=0";
    }
    $userBack = Am_Lite::getInstance()->getUsername();
    $user = Am_Di::getInstance()->userTable->findFirstByLogin($userBack);
    foreach($user->getActiveProductsExpiration() as $pid=>$expire){
    }
    $myProductArray = Am_Di::getInstance()->user->getActiveProductIds();
    foreach ($myProductArray as & $product) {
    }
    ?>

Share This Page