Fix arg type to preg_match(),preg_replace() with cast
This commit is contained in:
parent
171664b49f
commit
9b2c6e2afb
1 changed files with 2 additions and 2 deletions
|
|
@ -2242,9 +2242,9 @@ class ExpenseReport extends CommonObject
|
|||
// Clean vat code
|
||||
$reg = array();
|
||||
$vat_src_code = '';
|
||||
if (preg_match('/\((.*)\)/', $vatrate, $reg)) {
|
||||
if (preg_match('/\((.*)\)/', (string) $vatrate, $reg)) {
|
||||
$vat_src_code = $reg[1];
|
||||
$vatrate = preg_replace('/\s*\(.*\)/', '', $vatrate); // Remove code into vatrate.
|
||||
$vatrate = preg_replace('/\s*\(.*\)/', '', (string) $vatrate); // Remove code into vatrate.
|
||||
}
|
||||
$vatrate = preg_replace('/\*/', '', $vatrate);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue