More php8 deprecation fixes about required parameters following optional parameters.
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 15 Jun 2021 11:12:14 +0000 (13:12 +0200)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Tue, 15 Jun 2021 11:12:14 +0000 (13:12 +0200)
gl/includes/db/gl_db_banking.inc
gl/includes/db/gl_db_rates.inc
includes/current_user.inc
includes/db/class.data_set.inc
includes/ui/ui_lists.inc
includes/ui/ui_view.inc
inventory/includes/db/items_db.inc
purchasing/includes/db/suppalloc_db.inc
sales/includes/db/custalloc_db.inc

index 1a6aed3e857b6c78ea52d4a75ad3cd298b7f5947..14c7f14feca65cee7b6dd62295bb357df2045c27 100644 (file)
@@ -143,7 +143,7 @@ function get_account_home_balance($person_id, $person_type, $rec_account, $to_da
 // Note: in 2.4.9 sparse 'ref' argument was removed (generated transactions use
 // next references from default refline).
 //
-function add_exchange_variation_all($date=null, $memo)
+function add_exchange_variation_all($date, $memo)
 {
        begin_transaction();
        $exchanged = false;
index 4118492ef7e7cdd7e56e4323954e2aa95942eab5..705c57d83acba0450e3801f22e6fef5d301713c7 100644 (file)
@@ -126,7 +126,7 @@ function retrieve_exrate($curr_b, $date)
 }
 //-----------------------------------------------------------------------------
 
-function get_extern_rate($curr_b, $provider = 'ECB', $date) 
+function get_extern_rate($curr_b, $provider, $date) 
 {
        global  $path_to_root;
 
index 82c8daaf619ee1e46829bc8895c6bfc3be1dd12a..0ee568994fdcbfa1ad186a52c301527acf634827 100644 (file)
@@ -377,7 +377,7 @@ if (!function_exists('money_format'))
 
 // 2008-06-15. Added extra parameter $stock_id and reference for $dec
 //--------------------------------------------------------------------
-function qty_format($number, $stock_id=null, &$dec) {
+function qty_format($number, $stock_id, &$dec) {
        $dec = get_qty_dec($stock_id);
     return number_format2($number, $dec);
 }
index 93846d0dd1fe4d65eeab9ce46aff34c96d2ae640..e81b8ba3fabc130a06fea904c3ab48659a72ab16 100644 (file)
@@ -97,7 +97,7 @@ abstract class record_set {
        *       @key - record key (u/d)
        *       @data - data to be validated (i/u)
        **/
-       function _validate($key=null, $data)
+       function _validate($key, $data)
        {
                $mode = isset($data) ? (isset($key) ? 'u' : 'i') : 'd';
 
index 5ca6a49d4c84da915ff56dcc4c3e8b85b173fcd8..1d804985bff59a491343a73c0965bb81050f7169 100644 (file)
@@ -2310,7 +2310,7 @@ function quick_entries_list($name, $selected_id=null, $type=null, $submit_on_cha
 
 }
 
-function quick_entries_list_cells($label, $name, $selected_id=null, $type, $submit_on_change=false)
+function quick_entries_list_cells($label, $name, $selected_id, $type, $submit_on_change=false)
 {
        if ($label != null)
                echo "<td>$label</td>\n";
@@ -2319,7 +2319,7 @@ function quick_entries_list_cells($label, $name, $selected_id=null, $type, $subm
        echo "</td>";
 }
 
-function quick_entries_list_row($label, $name, $selected_id=null, $type, $submit_on_change=false)
+function quick_entries_list_row($label, $name, $selected_id, $type, $submit_on_change=false)
 {
        echo "<tr><td class='label'>$label</td>";
        quick_entries_list_cells(null, $name, $selected_id, $type, $submit_on_change);
index 99a753d5ef5623cf808f21eaf904373b9c7d1b9f..d4e1c50b1319ba45e72da2e57b5f799b57de947a 100644 (file)
@@ -270,7 +270,7 @@ function check_ui_refresh($name=null)
 // When there is no exrate for today, 
 // gets it form ECB and stores in local database.
 //
-function exchange_rate_display($from_currency=null, $to_currency=null, $date_, $force_edit=false)
+function exchange_rate_display($from_currency, $to_currency, $date_, $force_edit=false)
 {
     global $Ajax, $SysPrefs;
 
index 07fde0d172768d1872dc80aead3876a361edcb7c..02345a67edfad638868a5fb86e06bb6d5b2863f1 100644 (file)
@@ -10,7 +10,7 @@
     See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
 ***********************************************************************/
 function update_item($stock_id, $description, $long_description, $category_id, 
-       $tax_type_id, $units='', $mb_flag='', $sales_account, $inventory_account, 
+       $tax_type_id, $units, $mb_flag, $sales_account, $inventory_account, 
        $cogs_account,  $adjustment_account, $wip_account, $dimension_id, 
        $dimension2_id, $no_sale, $editable, $no_purchase,
        $depreciation_method = 'D', $depreciation_rate=100, $depreciation_factor=1,
index e8506bb04c6ff5101ae788730aa0bb03a861ad7c..ad83e7e4011224f03c381d0dfb532599f426e37b 100644 (file)
@@ -100,7 +100,7 @@ function clear_supp_alloctions($type, $type_no, $person_id=null, $date="")
 }
 //-------------------------------------------------------------------------------------------------------------
 
-function get_allocatable_from_supp_sql($supplier_id=null, $settled)
+function get_allocatable_from_supp_sql($supplier_id, $settled)
 {
        $sql = "SELECT
                trans.type,
index a1f6a61c5e6ac2af3694a4563bd7f25404c7f8b3..6dc3ee0423dc359d65edd5c29e41470227ce70ff 100644 (file)
@@ -98,7 +98,7 @@ function clear_cust_alloctions($type, $type_no, $person_id=null, $date="")
 }
 //-------------------------------------------------------------------------------------------------------------
 
-function get_allocatable_from_cust_sql($customer_id=null, $settled)
+function get_allocatable_from_cust_sql($customer_id, $settled)
 {
        $sql = "SELECT
                trans.type,