SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Apr 2003
    Location
    New Zealand
    Posts
    168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    increment/decrement error

    Can anyone suggest a reason why the following error occured? It's happened only once so far. I just need a hint as to possible causes so I can track it down.
    Fatal error: Cannot increment/decrement overloaded objects nor string offsets in
    /home/IPDataEngine/store_modules/shop/lib/ps_cart.inc on line 62
    Line 62 is:
    Code:
    $cart["idx"]++;
    John

  2. #2
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    not sure about this, but you possibly have to explicitly cast the variable to be of type integer...don't have the means to test it right now, but
    Code:
    (int)$cart['idx']++;
    or
    Code:
    $cart['idx'] = (int)$cart['idx'] + 1;
    may do the job...
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •