Dodanie raportowania błędów oraz poprawa formatowania kodu w plikach konfiguracyjnych i obsługi przesyłania obrazów produktów

This commit is contained in:
2025-01-06 10:39:04 +01:00
parent d8fe9e78fb
commit 6621eb8d40
2 changed files with 23 additions and 22 deletions

View File

@@ -1,4 +1,5 @@
<?php
error_reporting( E_ALL ^ E_NOTICE ^ E_STRICT ^ E_WARNING ^ E_DEPRECATED );
define( 'gdir', "/libraries/grid" );
require_once dirname( __FILE__ ) . '/grid-view.php';
require_once dirname( __FILE__ ) . '/gdb.min.php';

View File

@@ -127,7 +127,7 @@ if ( !$chunks || $chunk == $chunks - 1 )
$o = $mdb -> max( 'pp_shop_products_images', 'o' );
$mdb -> insert( 'pp_shop_products_images', [
'product_id' => $_POST['product_id'] ? $_POST['product_id'] : null,
'product_id' => isset( $_POST['product_id'] ) ? $_POST['product_id'] : null,
'src' => substr( $filePath, 5, strlen( $filePath ) ),
'o' => ++$o
] );