mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Qual: Ensure type is string.
This commit is contained in:
parent
ba32606084
commit
f322aad97b
|
|
@ -1,4 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*/
|
||||
'@phan-var-force DolibarrModules $this';
|
||||
|
||||
// $keyforselect = name of main table
|
||||
|
|
@ -51,7 +53,7 @@ if ($resql) { // This can fail when class is used on old database (during mig
|
|||
$tmpparam = jsonOrUnserialize($obj->param); // $tmp may be array 'options' => array 'c_currencies:code_iso:code_iso' => null
|
||||
if (is_array($tmpparam) && array_key_exists('options', $tmpparam) && $tmpparam['options'] && is_array($tmpparam['options'])) {
|
||||
$tmpkeys = array_keys($tmpparam['options']);
|
||||
$tmp = array_shift($tmpkeys);
|
||||
$tmp = (string) array_shift($tmpkeys);
|
||||
}
|
||||
if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) {
|
||||
$typeFilter = "List:".$tmp;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user