summaryrefslogtreecommitdiff
path: root/add_supplier.php
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-06-01 09:21:16 +0100
committerLester Caine <lester@lsces.co.uk>2026-06-01 09:21:16 +0100
commitac18ebb5879a49a63e0bf624fc25c8e9d36820b0 (patch)
tree753358c36c1b2d57d3e9d821059816fab13d1318 /add_supplier.php
parenta74b4484497624f668bdaa090272c5cdb185290e (diff)
downloadstock-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.php5
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() );