Arrow_left   Arrow_right
 
  #45

IR_base::dbobj2ORM & array_shift variable reference issues

    • Created on: Wed, 20 May 2009 (over 2 years ago)
    • Reported by: Stan Angeloff
    • Assigned to: -
    • Milestone: 1.0
    • Status: Fixed
    • Priority: Normal (3)
    • Component: -
    The following code:

    				$result =& array_shift($result);


    does not work as expected in PHP 4. array_shift does not return values by reference, thus triggering a PHP warning. This code solves the issue:


    				reset($result);
    				$result =& $result[key($result)];


    I haven't tested the above in PHP 5, but I don't see why it wouldn't work as expected.

    Cheers,
    Stan
  • Followers
     
    Ico-users Stan Angeloff 
     
    Attachments
    No attachments
    Associations
     
    No associations
    Activity
     
    User picture

          on May 20, 2009 @ 05:45AM UTC * By m4rw3r

    Status changed from New to Fixed
    (In revision:279) Fixes #42, #43, #44 and #45
    Thanks for spotting those Stan!
    Time Expenditure
    Loading