snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Creating default object from empty value on accepting the accessory

Open pradeepneelam opened this issue 10 years ago • 0 comments

Hi Snipe,

I am getting an error "Creating default object from empty value" when accepting an accessory.

Steps to Reproduce 1.Checked out an accessory to a user 2.user receives the email for accessory acceptance,with a link to accept the asset.The links says "I have read and agree to the terms of use, and have received this item." 3.When clicked on the link it is redirected to the page which gives two radio button options (i accept i decline) 4.when i select I accept radio button and clicked on submit button 5.I see the below error ErrorException (E_WARNING) (in line 254) HELP Creating default object from empty value

Open: C:\xampp\htdocs\evassets\app\controllers\account\ViewAssetsController.php $log = $logaction->logaction($logaction_msg);

    $update_checkout = DB::table('asset_logs')
    ->where('id',$findlog->id)
    ->update(array('accepted_id' => $logaction->id));

        $affected_asset=$logaction->assetlog;
        **$affected_asset->accepted=$accepted;**
        $affected_asset->save();

Kindly look into this and give me a solution,thanks in advance

pradeepneelam avatar Mar 10 '16 08:03 pradeepneelam