We have a “gotItem” function which, if run on an Item with an “on_hand” value of “1”, should also call the “outItem” function. For some reason, the “gotItem” function is calling the “outItem” function whether or not the “on_hand” value is “1” or “0”. Any ideas why? Code is below
function gotItem( $user_item_id, $user_id )
{
$user_item = $this->getUserItem( $user_id, $user_item_id );
if ( ( ! is_null( $user_item ) ) && ( $user_item['on_hand'] = '1' ) )
$this->outItem( $user_item_id, $user_id );
=is used for assignment use==for checking