Fixed php 7.2 count() compatibility and intval cast in number_format2 parameter 2.
[fa-stable.git] / sales / includes / sales_db.inc
index 465002303887c7ca2659ea5ec8aa9b34865e360c..d58d8cf76988ab7fec955717a503bf9e88e1b573 100644 (file)
@@ -368,7 +368,7 @@ function get_sales_child_documents($trans_type, $trans_no)
        // FIXME -  credit notes retrieved here should be those linked to invoices containing 
        // at least one line from related invoice
 
-       if (!count($trans_no))
+       if (!count_array($trans_no))
                return false;
        $childs = get_sales_child_numbers($trans_type, $trans_no, false);
        if (!count($childs))