Fixed empty(trim)) error in versions prior to php 5.5
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 27 Apr 2015 08:04:03 +0000 (10:04 +0200)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Mon, 27 Apr 2015 08:04:03 +0000 (10:04 +0200)
purchasing/po_entry_items.php

index a4afb367dce2194cc7c1b7e12c243770ec64ed1d..3a898d3da38432d8a78d570318f0ca2120f96cf1 100644 (file)
@@ -360,7 +360,7 @@ function can_commit()
        }
        }
 
-       if ($_SESSION['PO']->trans_type == ST_SUPPINVOICE && empty(trim(get_post('supp_ref'))))
+       if ($_SESSION['PO']->trans_type == ST_SUPPINVOICE && trim(get_post('supp_ref')) == false)
        {
                display_error(_("You must enter a supplier's invoice reference."));
                set_focus('supp_ref');