update
This commit is contained in:
@@ -1751,8 +1751,10 @@ class ProductRepository
|
||||
if ( \Shared\Helpers\Helpers::is_array_fix( $customFields ) ) {
|
||||
foreach ( $customFields as $row ) {
|
||||
$this->db->insert( 'pp_shop_products_custom_fields', [
|
||||
'id_product' => $newProductId,
|
||||
'name' => $row['name'],
|
||||
'id_product' => $newProductId,
|
||||
'name' => $row['name'],
|
||||
'type' => $row['type'] ?? 'text',
|
||||
'is_required' => $row['is_required'] ?? 0,
|
||||
] );
|
||||
}
|
||||
}
|
||||
@@ -2140,6 +2142,8 @@ class ProductRepository
|
||||
$full = realpath('../' . ltrim($src, '/'));
|
||||
if ($full && strpos($full, $base . DIRECTORY_SEPARATOR) === 0 && is_file($full)) {
|
||||
unlink($full);
|
||||
} elseif ($full) {
|
||||
error_log( '[shopPRO] safeUnlink: ścieżka poza upload/: ' . $src );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user