summaryrefslogtreecommitdiff
path: root/import
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-28 16:17:23 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-28 16:17:23 +0100
commit219a53a7296d821640c9b7abcdc26256e11b9850 (patch)
treed9f8c45eeea47c1771524e292d3b0a241f8144d0 /import
parent69173bfb38c12696a50cecf0702658dfb3749eb5 (diff)
downloadstock-219a53a7296d821640c9b7abcdc26256e11b9850.tar.gz
stock-219a53a7296d821640c9b7abcdc26256e11b9850.tar.bz2
stock-219a53a7296d821640c9b7abcdc26256e11b9850.zip
Fix fgetcsv deprecation: pass explicit escape parameter
PHP 8.5 warns when the escape param is omitted as its default will change. Pass '' to match the existing convention in load_stock.php. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'import')
-rw-r--r--import/load_kitlocker_assemblies.php2
-rw-r--r--import/load_kitlocker_groups.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/import/load_kitlocker_assemblies.php b/import/load_kitlocker_assemblies.php
index cff5548..8bff268 100644
--- a/import/load_kitlocker_assemblies.php
+++ b/import/load_kitlocker_assemblies.php
@@ -40,7 +40,7 @@ if( empty( $klidMap ) ) {
} else {
$fh = fopen( $csvFile, 'r' );
$rowNum = 0;
- while( ($cols = fgetcsv( $fh )) !== false ) {
+ while( ($cols = fgetcsv( $fh, 0, ',', '"', '' )) !== false ) {
$rowNum++;
if( $rowNum === 1 ) continue; // header: Title, Description, SGL, KL3M, Group
diff --git a/import/load_kitlocker_groups.php b/import/load_kitlocker_groups.php
index c189769..5bc4795 100644
--- a/import/load_kitlocker_groups.php
+++ b/import/load_kitlocker_groups.php
@@ -37,7 +37,7 @@ if( !$parent->isValid() ) {
} else {
$fh = fopen( $csvFile, 'r' );
$rowNum = 0;
- while( ($cols = fgetcsv( $fh )) !== false ) {
+ while( ($cols = fgetcsv( $fh, 0, ',', '"', '' )) !== false ) {
$rowNum++;
if( $rowNum === 1 ) continue; // header: KLID, Title