diff --git a/htdocs/variants/class/ProductAttribute.class.php b/htdocs/variants/class/ProductAttribute.class.php
index e30c34735ea..1b62f1b60e4 100644
--- a/htdocs/variants/class/ProductAttribute.class.php
+++ b/htdocs/variants/class/ProductAttribute.class.php
@@ -1253,6 +1253,7 @@ class ProductAttribute extends CommonObject
}
if (property_exists($this, 'amount')) {
$return .= '
';
+ // @phan-suppress-next-line PhanUndeclaredProperty
$return .= ''.price($this->amount, 0, $langs, 1, -1, -1, $conf->currency).'';
}
if (method_exists($this, 'getLibStatut')) {
diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php
index aa4c2fe2463..38bdefbd9b4 100644
--- a/htdocs/viewimage.php
+++ b/htdocs/viewimage.php
@@ -2,6 +2,7 @@
/* Copyright (C) 2004-2005 Rodolphe Quiedeville
* Copyright (C) 2005-2016 Laurent Destailleur
* Copyright (C) 2005-2016 Regis Houssin
+ * Copyright (C) 2024 MDW
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -322,7 +323,7 @@ if ($modulepart == 'barcode') {
// If $code is virtualcard_xxx_999.vcf, it is a file to read to get code
$reg = array();
- if (preg_match('/virtualcard_([^_]+)_(\d+)\.vcf/', $code, $reg)) {
+ if (preg_match('/^virtualcard_([^_]+)_(\d+)\.vcf$/', $code, $reg)) {
$vcffile = '';
if ($reg[1] == 'user') {
$vcffile = $conf->user->dir_temp.'/'.$code;