diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-06-01 09:21:16 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-06-01 09:21:16 +0100 |
| commit | ac18ebb5879a49a63e0bf624fc25c8e9d36820b0 (patch) | |
| tree | 753358c36c1b2d57d3e9d821059816fab13d1318 /add_supplier.php | |
| parent | a74b4484497624f668bdaa090272c5cdb185290e (diff) | |
| download | stock-ac18ebb5879a49a63e0bf624fc25c8e9d36820b0.tar.gz stock-ac18ebb5879a49a63e0bf624fc25c8e9d36820b0.tar.bz2 stock-ac18ebb5879a49a63e0bf624fc25c8e9d36820b0.zip | |
Fix storeXref calls to use named variables (passed by reference)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'add_supplier.php')
| -rw-r--r-- | add_supplier.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/add_supplier.php b/add_supplier.php index c76f978..f834380 100644 --- a/add_supplier.php +++ b/add_supplier.php @@ -30,7 +30,7 @@ if( !empty( $_REQUEST['fAddSupplier'] ) ) { if( empty( $_REQUEST['supplier_content_id'] ) || !is_numeric( $_REQUEST['supplier_content_id'] ) ) { $gContent->mErrors[] = KernelTools::tra( 'Please select a supplier.' ); } else { - $gContent->storeXref( [ + $supHash = [ 'content_id' => $gContent->mContentId, 'item' => '#SUP', 'xref' => (int)$_REQUEST['supplier_content_id'], @@ -38,7 +38,8 @@ if( !empty( $_REQUEST['fAddSupplier'] ) ) { 'xkey_ext' => trim( $_REQUEST['price'] ?? '' ), 'edit' => trim( $_REQUEST['note'] ?? '' ), 'fAddXref' => 1, - ] ); + ]; + $gContent->storeXref( $supHash ); if( empty( $gContent->mErrors ) ) { header( 'Location: '.$gContent->getEditUrl() ); |
