mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix: 🛟Duplicate test and false positive phan notice (#30822)
* Qual: Fix false positive phan notice * Fix: Duplicate condition for vcf location, change 2nd test to contact
This commit is contained in:
parent
3f9b2d9d57
commit
56e2c8bf36
|
|
@ -1253,6 +1253,7 @@ class ProductAttribute extends CommonObject
|
|||
}
|
||||
if (property_exists($this, 'amount')) {
|
||||
$return .= '<br>';
|
||||
// @phan-suppress-next-line PhanUndeclaredProperty
|
||||
$return .= '<span class="info-box-label amount">'.price($this->amount, 0, $langs, 1, -1, -1, $conf->currency).'</span>';
|
||||
}
|
||||
if (method_exists($this, 'getLibStatut')) {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2016 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user