dolibarr/htdocs/core/lib/security.lib.php

1313 lines
53 KiB
PHP
Raw Normal View History

<?php
/* Copyright (C) 2008-2021 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2008-2021 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2020 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2026 William Mead <william@m34d.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
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
2019-09-23 19:55:30 +00:00
* along with this program. If not, see <https://www.gnu.org/licenses/>.
* or see https://www.gnu.org/
*/
/**
2011-10-24 08:45:06 +00:00
* \file htdocs/core/lib/security.lib.php
2011-09-24 13:44:04 +00:00
* \ingroup core
* \brief Set of function used for dolibarr security (common function included into filefunc.inc.php)
2011-09-24 13:44:04 +00:00
* Warning, this file must not depends on other library files, except function.lib.php
* because it is used at low code level.
2008-11-17 00:02:57 +00:00
*/
include_once DOL_DOCUMENT_ROOT.'/blockedlog/lib/securitycore.lib.php';
/**
2018-04-19 10:03:42 +00:00
* Encode a string with base 64 algorithm + specific delta change.
*
2012-02-19 18:14:17 +00:00
* @param string $chain string to encode
2018-04-19 10:03:42 +00:00
* @param string $key rule to use for delta ('0', '1' or 'myownkey')
2025-06-14 15:41:10 +00:00
* @return string encoded string with format 'passcrypted'
* @see dol_decode(), dolEncrypt()
*/
function dol_encode($chain, $key = '1')
{
2021-02-23 21:03:23 +00:00
if (is_numeric($key) && $key == '1') { // rule 1 is offset of 17 for char
$output_tab = array();
$strlength = dol_strlen($chain);
2021-02-23 21:03:23 +00:00
for ($i = 0; $i < $strlength; $i++) {
$output_tab[$i] = chr(ord(substr($chain, $i, 1)) + 17);
2018-04-19 10:03:42 +00:00
}
$chain = implode("", $output_tab);
2021-02-23 21:03:23 +00:00
} elseif ($key) {
$result = '';
$strlength = dol_strlen($chain);
2021-02-23 21:03:23 +00:00
for ($i = 0; $i < $strlength; $i++) {
$keychar = substr($key, ($i % strlen($key)) - 1, 1);
$result .= chr(ord(substr($chain, $i, 1)) + (ord($keychar) - 65));
2018-04-19 10:03:42 +00:00
}
$chain = $result;
}
2018-04-19 10:03:42 +00:00
return base64_encode($chain);
}
/**
2018-04-19 10:03:42 +00:00
* Decode a base 64 encoded + specific delta change.
2012-02-19 18:14:17 +00:00
* This function is called by filefunc.inc.php at each page call.
*
2012-02-19 18:14:17 +00:00
* @param string $chain string to decode
2018-04-19 10:03:42 +00:00
* @param string $key rule to use for delta ('0', '1' or 'myownkey')
2012-02-19 18:14:17 +00:00
* @return string decoded string
* @see dol_encode(), dolDecrypt
*/
function dol_decode($chain, $key = '1')
{
$chain = base64_decode($chain);
2021-02-23 21:03:23 +00:00
if (is_numeric($key) && $key == '1') { // rule 1 is offset of 17 for char
$output_tab = array();
$strlength = dol_strlen($chain);
2021-02-23 21:03:23 +00:00
for ($i = 0; $i < $strlength; $i++) {
$output_tab[$i] = chr(ord(substr($chain, $i, 1)) - 17);
2018-04-19 10:03:42 +00:00
}
$chain = implode("", $output_tab);
2021-02-23 21:03:23 +00:00
} elseif ($key) {
$result = '';
$strlength = dol_strlen($chain);
2021-02-23 21:03:23 +00:00
for ($i = 0; $i < $strlength; $i++) {
$keychar = substr($key, ($i % strlen($key)) - 1, 1);
$result .= chr(ord(substr($chain, $i, 1)) - (ord($keychar) - 65));
2018-04-19 10:03:42 +00:00
}
$chain = $result;
}
2018-04-19 10:03:42 +00:00
return $chain;
}
/**
* Return a string of random bytes (hexa string) with length = $length for cryptographic purposes.
*
* @param int $length Length of random string
* @return string Random string
*/
function dolGetRandomBytes($length)
{
2026-06-16 15:06:46 +00:00
if (function_exists('random_bytes')) { // Available with PHP 7+ only.
return bin2hex(random_bytes((int) floor($length / 2))); // the bin2hex will double the number of bytes so we take length / 2
}
return bin2hex(openssl_random_pseudo_bytes((int) floor($length / 2))); // the bin2hex will double the number of bytes so we take length / 2. May be very slow on Windows.
}
/**
2021-11-12 12:06:41 +00:00
* Returns a specific ldap hash of a password.
*
2021-11-12 12:06:41 +00:00
* @param string $password Password to hash
* @param 'md5'|'md5frommd5'|'smd5'|'sha'|'ssha'|'sha256'|'ssha256'|'sha384'|'ssha384'|'sha512'|'ssha512'|'crypt'|'clear' $type Type of hash
2021-11-12 12:06:41 +00:00
* @return string Hash of password
*/
2021-11-12 12:06:41 +00:00
function dolGetLdapPasswordHash($password, $type = 'md5')
{
if (empty($type)) {
$type = 'md5';
}
$salt = substr(sha1((string) time()), 0, 8);
2021-11-12 12:06:41 +00:00
if ($type === 'md5') {
2021-11-12 12:06:41 +00:00
return '{MD5}' . base64_encode(hash("md5", $password, true)); //For OpenLdap with md5 (based on an unencrypted password in base)
} elseif ($type === 'md5frommd5') {
2021-11-12 12:06:41 +00:00
return '{MD5}' . base64_encode(hex2bin($password)); // Create OpenLDAP MD5 password from Dolibarr MD5 password
} elseif ($type === 'smd5') {
2021-11-12 12:06:41 +00:00
return "{SMD5}" . base64_encode(hash("md5", $password . $salt, true) . $salt);
} elseif ($type === 'sha') {
2021-11-12 12:06:41 +00:00
return '{SHA}' . base64_encode(hash("sha1", $password, true));
} elseif ($type === 'ssha') {
2021-11-12 12:06:41 +00:00
return "{SSHA}" . base64_encode(hash("sha1", $password . $salt, true) . $salt);
} elseif ($type === 'sha256') {
return "{SHA256}" . base64_encode(hash("sha256", $password, true));
} elseif ($type === 'ssha256') {
return "{SSHA256}" . base64_encode(hash("sha256", $password . $salt, true) . $salt);
} elseif ($type === 'sha384') {
return "{SHA384}" . base64_encode(hash("sha384", $password, true));
} elseif ($type === 'ssha384') {
return "{SSHA384}" . base64_encode(hash("sha384", $password . $salt, true) . $salt);
} elseif ($type === 'sha512') {
return "{SHA512}" . base64_encode(hash("sha512", $password, true));
} elseif ($type === 'ssha512') {
return "{SSHA512}" . base64_encode(hash("sha512", $password . $salt, true) . $salt);
} elseif ($type === 'crypt') {
2021-11-12 12:06:41 +00:00
return '{CRYPT}' . crypt($password, $salt);
} elseif ($type === 'clear') {
return '{CLEAR}' . $password; // Just for test, plain text password is not secured !
}
return "";
}
/**
* Check permissions of a user to show a page and an object. Check read permission.
2017-05-16 11:27:32 +00:00
* If GETPOST('action','aZ09') defined, we also check write and delete permission.
* This method check permission on module then call checkUserAccessToObject() for permission on object (according to entity and socid of user).
*
2022-12-05 02:08:57 +00:00
* @param User $user User to check
2023-04-03 10:06:16 +00:00
* @param string $features Features to check (it must be module name or $object->element. Can be a 'or' check with 'levela|levelb'.
2022-12-05 02:08:57 +00:00
* Examples: 'societe', 'contact', 'produit&service', 'produit|service', ...)
* This is used to check permission $user->rights->features->...
2026-07-17 09:28:00 +00:00
* @param int|string|Object $object Object (recommended) or Object ID or list of Object ID if we want to check a particular record (optional) is linked to a owned thirdparty (optional).
2022-12-05 02:08:57 +00:00
* @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity for multicompany module. Param not used if objectid is null (optional).
* @param string $feature2 Feature to check, second level of permission (optional). Can be a 'or' check with 'sublevela|sublevelb'.
* This is used to check permission $user->rights->features->feature2...
* @param string $dbt_keyfield Field name for socid foreign key if not fk_soc. Not used if objectid is null (optional). Can use '' if NA.
2023-03-27 08:00:12 +00:00
* @param string $dbt_select Field rowid name, for select into tableandshare if not "rowid". Not used if objectid is null (optional)
* @param int<0,1> $isdraft 1=The object with id=$objectid is a draft
* @param int<0,1> $mode Mode (0=default, 1=return without dying)
* @return int If mode = 0 (default): die process if not allowed (else return 1). If mode = 1: Return 0 if access not allowed (else return 1).
* @see dol_check_secure_access_document(), checkUserAccessToObject()
*/
2022-12-05 02:08:57 +00:00
function restrictedArea(User $user, $features, $object = 0, $tableandshare = '', $feature2 = '', $dbt_keyfield = 'fk_soc', $dbt_select = 'rowid', $isdraft = 0, $mode = 0)
{
2018-05-10 09:30:27 +00:00
global $hookmanager;
2023-03-27 08:00:12 +00:00
// Define $objectid
2022-12-05 02:08:57 +00:00
if (is_object($object)) {
$objectid = $object->id;
} else {
$objectid = $object; // $objectid can be X or 'X,Y,Z'
}
if ($objectid == "-1") {
$objectid = 0;
}
2023-01-31 20:17:06 +00:00
if ($objectid) {
2024-03-19 17:59:14 +00:00
$objectid = preg_replace('/[^0-9\.\,]/', '', (string) $objectid); // For the case value is coming from a non sanitized user input
2023-01-31 20:17:06 +00:00
}
2022-03-01 17:46:55 +00:00
2026-07-17 09:28:00 +00:00
//dol_syslog("functions.lib:restrictedArea $feature, $object, $dbtablename, $feature2, $dbt_socfield, $dbt_select, $isdraft");
/*print "user_id=".$user->id.", features=".$features.", feature2=".$feature2.", object=".$object;
2023-05-10 02:11:41 +00:00
print ", dbtablename=".$tableandshare.", dbt_socfield=".$dbt_keyfield.", dbt_select=".$dbt_select;
2023-09-05 14:50:23 +00:00
print ", perm: user->hasRight(".$features.($feature2 ? ",".$feature2 : "").", lire) = ".($feature2 ? $user->hasRight($features, $feature2, 'lire') : $user->hasRight($features, 'lire'))."<br>";
2023-05-10 02:11:41 +00:00
*/
2020-06-07 21:00:38 +00:00
$parentfortableentity = '';
2023-12-08 22:45:18 +00:00
// Fix syntax of $features param to support non standard module names.
// @todo : use elseif ?
$originalfeatures = $features;
2023-03-27 08:00:12 +00:00
if ($features == 'agenda') {
$tableandshare = 'actioncomm&societe';
$feature2 = 'myactions|allactions';
$dbt_select = 'id';
2026-08-05 22:13:43 +00:00
} elseif ($features == 'bank') {
2023-06-10 23:07:21 +00:00
$features = 'banque';
2026-08-05 22:13:43 +00:00
} elseif ($features == 'facturerec') {
2021-02-23 21:03:23 +00:00
$features = 'facture';
2026-08-05 22:13:43 +00:00
} elseif ($features == 'supplier_invoicerec') {
2023-09-05 17:13:51 +00:00
$features = 'fournisseur';
$feature2 = 'facture';
2026-08-05 22:13:43 +00:00
} elseif ($features == 'mo') {
2021-02-23 21:03:23 +00:00
$features = 'mrp';
2026-08-05 22:13:43 +00:00
} elseif ($features == 'member') {
2021-02-23 21:03:23 +00:00
$features = 'adherent';
2026-08-05 22:13:43 +00:00
} elseif ($features == 'subscription') {
2021-03-01 19:37:16 +00:00
$features = 'adherent';
$feature2 = 'cotisation';
2026-08-05 22:13:43 +00:00
} elseif ($features == 'website' && is_object($object) && $object->element == 'websitepage') {
2021-03-01 19:37:16 +00:00
$parentfortableentity = 'fk_website@website';
2026-08-05 22:13:43 +00:00
} elseif ($features == 'project') {
2021-02-23 21:03:23 +00:00
$features = 'projet';
NEW Drag and drop a file on the 23 remaining cards (#39473) * FIX Drag and drop of a file reports a wrong error, or none at all The error handler of dragAndDropFileUpload() had three defects that all end on the user believing the file was attached when it was not. - The first assignment of the message was dead code, there was no return after the test on the http code 403, so a refusal was reported as a generic error. - The key ErrorUploadPermissionDenied it used exists in no language file, so the raw key was shown. - JSON.parse() was called with no try/catch on an answer that is not always a json, a fatal error of the endpoint or a request over post_max_size for example. The exception left the user on a page with no message at all. - An empty list of files was treated as a success, while it means the endpoint stored nothing. The value of PHP_SELF is also escaped before it is written into the 6 generated javascript strings. It holds the path info of the request on a server that accepts it, so it is a user input. dol_escape_js() is called with the mode that escapes a double quote by a double quote, the strings being delimited by double quotes, and the sequence '</' is escaped too because the function does not do it and the path info could otherwise close the script tag and open one of its own. Adds the key ErrorOnAtLeastOneFileUpload to en_US, used when some files of a batch failed and some did not. * FIX getMultidirOutput returns a directory the Documents tab does not read Four defects of the same function, all ending on a file stored where the user will never see it, or written outside the documents directory. - The ref of the project of a task was only passed through dol_sanitizePathName(), which keeps a slash, a colon and the accented chars, while projet/tasks/document.php sanitizes it with dol_sanitizeFileName(). A project ref holding a slash even created an extra level of directory. Measured on real databases: 304 projects over 330 hold a slash on one of them, carrying 701 tasks over 824. - The same case calls $object->fetchProject() with no guard, while the signature of the function accepts an object that is not a CommonObject, and even a null when a module is given. Such a caller gets a fatal error where it expects the error string. No core caller is in that case today, an external module or a hook can be. - The entity of the object may have no declared directory, an object shared by another entity for example. The undefined index returned a relative path, so the caller read or wrote under the web root. The current entity is used instead, and the fallback is logged because the directory is then not the one of the entity of the object, which matters for a caller that deletes files. - When the current entity has no declared directory either, the fallback returned the sub directory alone, again a relative path. The same error than for a module that declares no directory at all is now returned. Adds the sub directory of a partnership and of a stock transfer, which their own document tabs already read. * FIX getElementProperties answers wrong properties for 9 elements A customer payment, a supplier payment, a various payment, a stock transfer and the 4 objects of the hrm module had no properties at all, or wrong ones, so any caller that resolves a class, a table or a document directory from an element failed on them. - payment, payment_supplier and payment_various had no branch. The branch of a customer payment tests $elementType and not $element, because the rule on the elements named myobject_mysubobject rewrites $element to 'payment' for 'payment_salary' too, which is stored somewhere else. - job, position, skill and evaluation answered a wrong table (hrm_job_user for a position, and so on) and no sub directory, while their document tabs read one named after the element. - stocktransfer answered an empty classname, because it is not the ucfirst() of the element, so a caller doing new $classname($db) ended on a fatal error. - The sub directory was concatenated even when the module is disabled and the directory is empty, which answered a path at the root of the file system. - A contact and a conference are stored into a sub directory their tab reads. isModEnabled('invoice') is tested for a customer payment: there is no module named 'compta', so testing it was always false, while $conf->compta->payment is set unconditionally by Conf::setValues() and could not be used as a proxy. * FIX Access refused to everyone on 11 objects of the core restrictedArea() and checkUserAccessToObject() refuse the access to objects that no permission and no rule can match, whatever the user, an administrator included. - The hrm module declares no permission at its first level, only 'all', and the stocktransfer module only 'stocktransfer'. A check on the module itself therefore tests a permission that does not exist. The mapping is the same one as into User::hasRight(). - The module of an event organization declares no permission at all, its whole permission block being commented out on purpose, and its cards check the parent project instead. The feature is mapped onto that project, with the two guards the card has: an external user is refused, and so is a conference with no parent project, whose id of 0 would otherwise grant an access with no check on the record at all. - The default rule of checkUserAccessToObject() builds its sql on the columns entity and fk_soc of the table. llx_asset, llx_paiement, llx_paiementfourn and llx_workstation_workstation have no fk_soc, and llx_hrm_job, llx_hrm_job_user and llx_hrm_skill have neither. The sql failed, so the access was refused to every user this rule applies to. These tables are now checked on their entity only, which is what the $check rule already does for the same class of tables, and the 3 tables of hrm can be checked on nothing at all. The rule is selected on the table and not on the element, because $object is an id and not an object for most of the callers, the cards of an asset and of a workstation included, which are broken today for any user without the permission to see all third parties. - An external user is refused explicitly on those tables: none of these objects is linked to a third party, so the default rule refused him through a link that does not exist, and the rules that replace it do not look at the third party of the user at all. Measured on a vanilla instance with 5 profiles, an administrator, an internal user with every right, one without the permission to see all third parties, one that is not a sales representative of the third party of the object, and an external user: the 11 objects go from refused to granted for the internal users and stay refused for the external one, and the 26 other elements answer exactly the same for the 5 profiles. * FIX A file dropped on a card is lost, or reported as refused when it was stored FileUpload stores the file into a directory that the "Attached files" tab of the object never reads, so the user attaches a file that no screen will ever show, and nothing is indexed in database to find it back. Measured on real databases: 216487 thirdparties over 216887 and 157852 products over 280319 are in that case on the cards that already enable the drag and drop. - The directory of the object is now forged with get_exdir(), the way the tabs do: it always uses the id for a thirdparty, whose ref is a company name and is not unique, and it falls back on the id when the ref is empty. The sub directory of the module is read with getMultidirOutput(), which knows the elements that store their documents into one. That function does not return an empty string when it fails but a string starting with 'error-', so only an absolute path is accepted: writing into that string would create the files under the web root. - fetchObjectByElement() returns an object even when fetch() returned 0. The object was then not loaded, and the file was stored at the root of the directory of the module, out of any object. The constructor now throws, and the endpoint answers the error with the same json contract than a successful call so that the caller can show it, instead of a fatal error and an http 500. - An attachment of the same name was silently overwritten, dol_move_uploaded_file() being called with $allowoverwrite = 1 while the name was checked before the ref of the object was added as a prefix. The check is done again on the final name, and on the .noexe suffixed name too, which that function appends to an executable file. - An executable file was renamed with that .noexe suffix and then reported as an error, while it was correctly stored. - The endpoint called restrictedArea() with an empty feature when the element is unknown, and the loop of that function then takes no branch at all and grants the access with no check. It refuses before, with the same http code and the same message than a refusal, so that a user cannot tell an object that exists but is not allowed from an object that does not exist. The refusal of an external user on an object of another third party answered a message of its own, which allowed the same enumeration. Comes with the tests of the path resolution, of the fallback of get_exdir(), of the rejection of the error string of getMultidirOutput(), and of the file name deduplication. * FIX Remove the drop area from 13 cards where dropping a file is harmful Two distinct groups, both of them removing a drop area that only produces a result the user does not want. 7 pages have no "Attached files" tab at all, so a file dropped on them can be reached by no screen: a fiscal year and its info page, an accounting model, a webhook trigger history, an intracomm report, a bookcal calendar and its booking list. Measured: 4 of them accepted the upload and wrote an orphan file, the accounting model wrote it at the root of the directory of the module, out of any object, and the 2 bookcal ones answered an http 500. 6 cards print their tabs inside their edit form, so the drop area covered that form: a product, an expense report, a VAT payment, a social contribution, a loan and a salary. Dropping a file there reloads the page, which discards what the user is typing. A product and an expense report have a second call for the read only view, so the drop area is only removed from the call of the edit branch; the 4 others share a single call between both views, so the parameter is now conditional. * NEW Drag and drop a file on the 23 remaining cards Every card of the core that owns an "Attached files" tab can now receive a file by drag and drop, which was the case of 32 of them only. The 23 added here are an asset, an event, a various payment, a customer payment, a contact, a donation, a conference or booth, a shipment, a supplier payment, a leave request, an evaluation, a job, a position, a skill, a knowledge record, a manufacturing order, a partnership, a lot, a stock transfer, a task, a reception, a resource and a workstation. The tab bar of a leave request and of a resource is printed inside their edit form, so the drop area is not enabled there: dropping a file reloads the page, which would discard what the user is typing. The card of a supplier payment prints its tab bar even when the object was not loaded, so the drop area is only enabled when it is. * FIX getMultidirOutput refuses an entity with no directory instead of falling back [skip-claudemd] The previous revision of this PR fell back on the directory of the current entity when the entity of the object had none, with a LOG_WARNING. On a multicompany install that made a caller read, write and above all delete files in the directory of another entity. Refuse instead: the function already answers 'error-diroutput-not-defined-for-this-object' when the module declares no directory at all, so the caller has one behaviour to handle, not two. The entity is cast to int, which is what the array index needs and what silences the four PhanTypeMismatchDimFetchNullable this function reported. --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-08-19 00:46:21 +00:00
} elseif ($features == 'eventorganization' && is_object($object) && $object->element == 'conferenceorbooth') {
// The module of an event organization declares no permission of its own, on purpose, so a check on
// 'eventorganization' is refused to everyone, an administrator included. Check the parent project
// instead, which is what the card of the object does itself.
// The card refuses an external user before that check, and fk_project is nullable, so we must refuse
// both cases here too: with no parent project there is nothing left to check the access on, and
// granting it would be an access with no check at all.
if (!empty($user->socid) || empty($object->fk_project)) {
if ($mode) {
return 0;
} else {
accessforbidden();
}
}
$features = 'projet';
$tableandshare = 'projet&project';
$objectid = (int) $object->fk_project;
$object = $objectid;
2026-08-05 22:13:43 +00:00
} elseif ($features == 'product') {
2021-02-23 21:03:23 +00:00
$features = 'produit';
2026-08-05 22:13:43 +00:00
} elseif ($features == 'productbatch') {
2023-04-01 12:38:07 +00:00
$features = 'produit';
2026-08-05 22:13:43 +00:00
} elseif ($features == 'tax') {
$feature2 = 'charges';
2026-08-05 22:13:43 +00:00
} elseif ($features == 'workstation') {
2023-06-28 13:15:37 +00:00
$feature2 = 'workstation';
NEW Drag and drop a file on the 23 remaining cards (#39473) * FIX Drag and drop of a file reports a wrong error, or none at all The error handler of dragAndDropFileUpload() had three defects that all end on the user believing the file was attached when it was not. - The first assignment of the message was dead code, there was no return after the test on the http code 403, so a refusal was reported as a generic error. - The key ErrorUploadPermissionDenied it used exists in no language file, so the raw key was shown. - JSON.parse() was called with no try/catch on an answer that is not always a json, a fatal error of the endpoint or a request over post_max_size for example. The exception left the user on a page with no message at all. - An empty list of files was treated as a success, while it means the endpoint stored nothing. The value of PHP_SELF is also escaped before it is written into the 6 generated javascript strings. It holds the path info of the request on a server that accepts it, so it is a user input. dol_escape_js() is called with the mode that escapes a double quote by a double quote, the strings being delimited by double quotes, and the sequence '</' is escaped too because the function does not do it and the path info could otherwise close the script tag and open one of its own. Adds the key ErrorOnAtLeastOneFileUpload to en_US, used when some files of a batch failed and some did not. * FIX getMultidirOutput returns a directory the Documents tab does not read Four defects of the same function, all ending on a file stored where the user will never see it, or written outside the documents directory. - The ref of the project of a task was only passed through dol_sanitizePathName(), which keeps a slash, a colon and the accented chars, while projet/tasks/document.php sanitizes it with dol_sanitizeFileName(). A project ref holding a slash even created an extra level of directory. Measured on real databases: 304 projects over 330 hold a slash on one of them, carrying 701 tasks over 824. - The same case calls $object->fetchProject() with no guard, while the signature of the function accepts an object that is not a CommonObject, and even a null when a module is given. Such a caller gets a fatal error where it expects the error string. No core caller is in that case today, an external module or a hook can be. - The entity of the object may have no declared directory, an object shared by another entity for example. The undefined index returned a relative path, so the caller read or wrote under the web root. The current entity is used instead, and the fallback is logged because the directory is then not the one of the entity of the object, which matters for a caller that deletes files. - When the current entity has no declared directory either, the fallback returned the sub directory alone, again a relative path. The same error than for a module that declares no directory at all is now returned. Adds the sub directory of a partnership and of a stock transfer, which their own document tabs already read. * FIX getElementProperties answers wrong properties for 9 elements A customer payment, a supplier payment, a various payment, a stock transfer and the 4 objects of the hrm module had no properties at all, or wrong ones, so any caller that resolves a class, a table or a document directory from an element failed on them. - payment, payment_supplier and payment_various had no branch. The branch of a customer payment tests $elementType and not $element, because the rule on the elements named myobject_mysubobject rewrites $element to 'payment' for 'payment_salary' too, which is stored somewhere else. - job, position, skill and evaluation answered a wrong table (hrm_job_user for a position, and so on) and no sub directory, while their document tabs read one named after the element. - stocktransfer answered an empty classname, because it is not the ucfirst() of the element, so a caller doing new $classname($db) ended on a fatal error. - The sub directory was concatenated even when the module is disabled and the directory is empty, which answered a path at the root of the file system. - A contact and a conference are stored into a sub directory their tab reads. isModEnabled('invoice') is tested for a customer payment: there is no module named 'compta', so testing it was always false, while $conf->compta->payment is set unconditionally by Conf::setValues() and could not be used as a proxy. * FIX Access refused to everyone on 11 objects of the core restrictedArea() and checkUserAccessToObject() refuse the access to objects that no permission and no rule can match, whatever the user, an administrator included. - The hrm module declares no permission at its first level, only 'all', and the stocktransfer module only 'stocktransfer'. A check on the module itself therefore tests a permission that does not exist. The mapping is the same one as into User::hasRight(). - The module of an event organization declares no permission at all, its whole permission block being commented out on purpose, and its cards check the parent project instead. The feature is mapped onto that project, with the two guards the card has: an external user is refused, and so is a conference with no parent project, whose id of 0 would otherwise grant an access with no check on the record at all. - The default rule of checkUserAccessToObject() builds its sql on the columns entity and fk_soc of the table. llx_asset, llx_paiement, llx_paiementfourn and llx_workstation_workstation have no fk_soc, and llx_hrm_job, llx_hrm_job_user and llx_hrm_skill have neither. The sql failed, so the access was refused to every user this rule applies to. These tables are now checked on their entity only, which is what the $check rule already does for the same class of tables, and the 3 tables of hrm can be checked on nothing at all. The rule is selected on the table and not on the element, because $object is an id and not an object for most of the callers, the cards of an asset and of a workstation included, which are broken today for any user without the permission to see all third parties. - An external user is refused explicitly on those tables: none of these objects is linked to a third party, so the default rule refused him through a link that does not exist, and the rules that replace it do not look at the third party of the user at all. Measured on a vanilla instance with 5 profiles, an administrator, an internal user with every right, one without the permission to see all third parties, one that is not a sales representative of the third party of the object, and an external user: the 11 objects go from refused to granted for the internal users and stay refused for the external one, and the 26 other elements answer exactly the same for the 5 profiles. * FIX A file dropped on a card is lost, or reported as refused when it was stored FileUpload stores the file into a directory that the "Attached files" tab of the object never reads, so the user attaches a file that no screen will ever show, and nothing is indexed in database to find it back. Measured on real databases: 216487 thirdparties over 216887 and 157852 products over 280319 are in that case on the cards that already enable the drag and drop. - The directory of the object is now forged with get_exdir(), the way the tabs do: it always uses the id for a thirdparty, whose ref is a company name and is not unique, and it falls back on the id when the ref is empty. The sub directory of the module is read with getMultidirOutput(), which knows the elements that store their documents into one. That function does not return an empty string when it fails but a string starting with 'error-', so only an absolute path is accepted: writing into that string would create the files under the web root. - fetchObjectByElement() returns an object even when fetch() returned 0. The object was then not loaded, and the file was stored at the root of the directory of the module, out of any object. The constructor now throws, and the endpoint answers the error with the same json contract than a successful call so that the caller can show it, instead of a fatal error and an http 500. - An attachment of the same name was silently overwritten, dol_move_uploaded_file() being called with $allowoverwrite = 1 while the name was checked before the ref of the object was added as a prefix. The check is done again on the final name, and on the .noexe suffixed name too, which that function appends to an executable file. - An executable file was renamed with that .noexe suffix and then reported as an error, while it was correctly stored. - The endpoint called restrictedArea() with an empty feature when the element is unknown, and the loop of that function then takes no branch at all and grants the access with no check. It refuses before, with the same http code and the same message than a refusal, so that a user cannot tell an object that exists but is not allowed from an object that does not exist. The refusal of an external user on an object of another third party answered a message of its own, which allowed the same enumeration. Comes with the tests of the path resolution, of the fallback of get_exdir(), of the rejection of the error string of getMultidirOutput(), and of the file name deduplication. * FIX Remove the drop area from 13 cards where dropping a file is harmful Two distinct groups, both of them removing a drop area that only produces a result the user does not want. 7 pages have no "Attached files" tab at all, so a file dropped on them can be reached by no screen: a fiscal year and its info page, an accounting model, a webhook trigger history, an intracomm report, a bookcal calendar and its booking list. Measured: 4 of them accepted the upload and wrote an orphan file, the accounting model wrote it at the root of the directory of the module, out of any object, and the 2 bookcal ones answered an http 500. 6 cards print their tabs inside their edit form, so the drop area covered that form: a product, an expense report, a VAT payment, a social contribution, a loan and a salary. Dropping a file there reloads the page, which discards what the user is typing. A product and an expense report have a second call for the read only view, so the drop area is only removed from the call of the edit branch; the 4 others share a single call between both views, so the parameter is now conditional. * NEW Drag and drop a file on the 23 remaining cards Every card of the core that owns an "Attached files" tab can now receive a file by drag and drop, which was the case of 32 of them only. The 23 added here are an asset, an event, a various payment, a customer payment, a contact, a donation, a conference or booth, a shipment, a supplier payment, a leave request, an evaluation, a job, a position, a skill, a knowledge record, a manufacturing order, a partnership, a lot, a stock transfer, a task, a reception, a resource and a workstation. The tab bar of a leave request and of a resource is printed inside their edit form, so the drop area is not enabled there: dropping a file reloads the page, which would discard what the user is typing. The card of a supplier payment prints its tab bar even when the object was not loaded, so the drop area is only enabled when it is. * FIX getMultidirOutput refuses an entity with no directory instead of falling back [skip-claudemd] The previous revision of this PR fell back on the directory of the current entity when the entity of the object had none, with a LOG_WARNING. On a multicompany install that made a caller read, write and above all delete files in the directory of another entity. Refuse instead: the function already answers 'error-diroutput-not-defined-for-this-object' when the module declares no directory at all, so the caller has one behaviour to handle, not two. The entity is cast to int, which is what the array index needs and what silences the four PhanTypeMismatchDimFetchNullable this function reported. --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-08-19 00:46:21 +00:00
} elseif ($features == 'hrm' && is_object($object) && in_array($object->element, array('job', 'position', 'skill'))) {
$feature2 = 'all'; // These 3 objects have no permission of their own, they share the level "all"
} elseif ($features == 'stocktransfer' && is_object($object) && $object->element == 'stocktransfer') {
$feature2 = 'stocktransfer'; // This module declares no permission at its first level, only this one
2026-08-05 22:13:43 +00:00
} elseif ($features == 'fournisseur') { // When vendor invoice and purchase order are into module 'fournisseur'
2023-04-24 18:11:02 +00:00
if (is_object($object) && $object->element == 'invoice_supplier') {
2023-03-26 18:51:51 +00:00
$feature2 = 'facture';
2023-04-24 18:11:02 +00:00
} elseif (is_object($object) && $object->element == 'order_supplier') {
2023-03-26 18:51:51 +00:00
$feature2 = 'commande';
}
2026-08-05 22:13:43 +00:00
} elseif ($features == 'payment_sc') {
2023-09-26 12:54:15 +00:00
$tableandshare = 'paiementcharge';
$parentfortableentity = 'fk_charge@chargesociales';
}
// if commonObjectLine : Using many2one related commonObject
// @see commonObjectLine::parentElement
if (in_array($features, ['commandedet', 'propaldet', 'facturedet', 'supplier_proposaldet', 'evaluationdet', 'skilldet', 'deliverydet', 'contratdet'])) {
$features = substr($features, 0, -3);
} elseif (in_array($features, ['stocktransferline', 'inventoryline', 'bomline', 'expensereport_det', 'facture_fourn_det'])) {
$features = substr($features, 0, -4);
} elseif ($features == 'commandefournisseurdispatch') {
$features = 'commandefournisseur';
} elseif ($features == 'invoice_supplier_det_rec') {
$features = 'invoice_supplier_rec';
}
if ($features == 'evaluation') {
$features = 'hrm';
$feature2 = 'evaluation';
}
2021-12-13 15:53:34 +00:00
// When the object is a task (element='project_task') and $feature2 is empty,
// $checkUserAccessToObject() falls into the $checkproject path and uses the task ID
// as project ID, which always fails. Setting $feature2='project_task' triggers the
// normalization at line 974 that redirects to the $checktask path, which correctly
// resolves $task->fk_project before calling getProjectsAuthorizedForUser().
if (is_object($object) && in_array($object->element, array('project_task', 'task'))
&& (empty($features) || in_array($features, array('projet', 'project')))
&& empty($feature2)) {
$features = 'projet';
$feature2 = 'project_task';
if (empty($tableandshare)) {
$tableandshare = 'projet_task';
}
}
2021-12-13 15:53:34 +00:00
// print $features.' - '.$tableandshare.' - '.$feature2.' - '.$dbt_select."\n";
2023-03-27 08:00:12 +00:00
2018-05-10 09:30:27 +00:00
// Get more permissions checks from hooks
$parameters = array(
'features' => $features,
'feature2' => $feature2,
'originalfeatures' => $originalfeatures,
'tableandshare' => $tableandshare,
'object' => $object,
'objectid' => $objectid,
'dbt_keyfield' => $dbt_keyfield,
'dbt_select' => $dbt_select,
'idtype' => $dbt_select,
'isdraft' => $isdraft,
'mode' => $mode,
);
if (!empty($hookmanager)) {
$reshook = $hookmanager->executeHooks('restrictedArea', $parameters);
if (isset($hookmanager->resArray['result'])) {
if ($hookmanager->resArray['result'] == 0) {
if ($mode) {
return 0;
} else {
accessforbidden(); // Module returns 0, so access forbidden
}
}
2021-02-23 21:03:23 +00:00
}
if ($reshook > 0) { // No other test done.
return 1;
}
}
2018-05-10 10:29:58 +00:00
2024-02-16 22:56:07 +00:00
// Features/modules to check (to support the & and | operator)
$featuresarray = array($features);
2021-02-23 21:03:23 +00:00
if (preg_match('/&/', $features)) {
$featuresarray = explode("&", $features);
} elseif (preg_match('/\|/', $features)) {
$featuresarray = explode("|", $features);
}
// More subfeatures to check
2021-02-23 21:03:23 +00:00
if (!empty($feature2)) {
$feature2 = explode("|", $feature2);
}
2023-12-13 14:20:53 +00:00
$listofmodules = explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL'));
// Check read permission from module
2021-03-01 19:37:16 +00:00
$readok = 1;
$nbko = 0;
foreach ($featuresarray as $feature) { // first we check nb of test ko
$featureforlistofmodule = $feature;
2021-02-23 21:03:23 +00:00
if ($featureforlistofmodule == 'produit') {
$featureforlistofmodule = 'product';
}
if ($featureforlistofmodule == 'supplier_proposal') {
$featureforlistofmodule = 'supplierproposal';
}
2023-11-27 10:39:32 +00:00
if (!empty($user->socid) && getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL') && !in_array($featureforlistofmodule, $listofmodules)) { // If limits on modules for external users, module must be into list of modules for external users
2021-03-01 19:37:16 +00:00
$readok = 0;
$nbko++;
continue;
}
2023-06-29 11:16:44 +00:00
if ($feature == 'societe' && (empty($feature2) || !in_array('contact', $feature2))) {
2022-12-05 02:08:57 +00:00
if (!$user->hasRight('societe', 'lire') && !$user->hasRight('fournisseur', 'lire')) {
2021-03-01 19:37:16 +00:00
$readok = 0;
$nbko++;
2021-02-23 21:03:23 +00:00
}
2023-06-29 11:16:44 +00:00
} elseif (($feature == 'societe' && (!empty($feature2) && in_array('contact', $feature2))) || $feature == 'contact') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('societe', 'contact', 'lire')) {
2021-03-01 19:37:16 +00:00
$readok = 0;
$nbko++;
2021-02-23 21:03:23 +00:00
}
} elseif ($feature == 'produit|service') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('produit', 'lire') && !$user->hasRight('service', 'lire')) {
2021-03-01 19:37:16 +00:00
$readok = 0;
$nbko++;
2021-02-23 21:03:23 +00:00
}
} elseif ($feature == 'prelevement') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('prelevement', 'bons', 'lire')) {
2021-03-01 19:37:16 +00:00
$readok = 0;
$nbko++;
2021-02-23 21:03:23 +00:00
}
} elseif ($feature == 'cheque') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('banque', 'cheque')) {
2021-03-01 19:37:16 +00:00
$readok = 0;
$nbko++;
2021-02-23 21:03:23 +00:00
}
} elseif ($feature == 'projet') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('projet', 'lire') && !$user->hasRight('projet', 'all', 'lire')) {
2021-03-01 19:37:16 +00:00
$readok = 0;
$nbko++;
2021-02-23 21:03:23 +00:00
}
} elseif ($feature == 'payment') {
2023-06-19 21:18:13 +00:00
if (!$user->hasRight('facture', 'lire')) {
2021-03-01 19:37:16 +00:00
$readok = 0;
$nbko++;
2021-02-23 21:03:23 +00:00
}
} elseif ($feature == 'payment_supplier') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('fournisseur', 'facture', 'lire')) {
2021-03-01 19:37:16 +00:00
$readok = 0;
$nbko++;
2021-02-23 21:03:23 +00:00
}
2023-01-03 18:16:38 +00:00
} elseif ($feature == 'payment_sc') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('tax', 'charges', 'lire')) {
2023-01-03 18:16:38 +00:00
$readok = 0;
$nbko++;
}
} elseif ($feature == 'webhook') {
if (empty($user->admin)) {
$readok = 0;
$nbko++;
}
} elseif (!empty($feature2)) { // This is for permissions on 2 levels (module->object->read)
$tmpreadok = 1;
foreach ($feature2 as $subfeature) {
2021-02-23 21:03:23 +00:00
if ($subfeature == 'user' && $user->id == $objectid) {
continue; // A user can always read its own card
}
2023-04-24 08:00:45 +00:00
if ($subfeature == 'fiscalyear' && $user->hasRight('accounting', 'fiscalyear', 'write')) {
// only one right for fiscalyear
$tmpreadok = 1;
continue;
}
2023-10-15 13:32:35 +00:00
if (!empty($subfeature) && !$user->hasRight($feature, $subfeature, 'lire') && !$user->hasRight($feature, $subfeature, 'read')) {
2021-02-23 21:03:23 +00:00
$tmpreadok = 0;
2023-10-15 13:32:35 +00:00
} elseif (empty($subfeature) && !$user->hasRight($feature, 'lire') && !$user->hasRight($feature, 'read')) {
2021-02-23 21:03:23 +00:00
$tmpreadok = 0;
} else {
2021-03-01 19:37:16 +00:00
$tmpreadok = 1;
break;
2021-02-23 21:03:23 +00:00
} // Break is to bypass second test if the first is ok
}
if (!$tmpreadok) { // We found a test on feature that is ko
$readok = 0; // All tests are ko (we manage here the and, the or will be managed later using $nbko).
$nbko++;
}
} elseif (!empty($feature) && ($feature != 'user' && $feature != 'usergroup')) { // This is permissions on 1 level (module->read)
2023-10-15 13:32:35 +00:00
if (!$user->hasRight($feature, 'lire')
&& !$user->hasRight($feature, 'read')
&& !$user->hasRight($feature, 'run')) {
2021-03-01 19:37:16 +00:00
$readok = 0;
$nbko++;
2021-02-23 21:03:23 +00:00
}
}
}
// If a or and at least one ok
2021-02-23 21:03:23 +00:00
if (preg_match('/\|/', $features) && $nbko < count($featuresarray)) {
$readok = 1;
}
2021-02-23 21:03:23 +00:00
if (!$readok) {
if ($mode) {
return 0;
} else {
accessforbidden();
}
2021-02-23 21:03:23 +00:00
}
//print "Read access is ok";
// Check write permission from module (we need to know write permission to create but also to delete drafts record or to upload files)
2021-03-01 19:37:16 +00:00
$createok = 1;
$nbko = 0;
$wemustcheckpermissionforcreate = (GETPOST('sendit', 'alpha') || GETPOST('linkit', 'alpha') || in_array(GETPOST('action', 'aZ09'), array('create', 'update', 'set', 'upload', 'add_element_resource', 'confirm_deletebank', 'confirm_delete_linked_resource')) || GETPOST('roworder', 'alpha', 2));
$wemustcheckpermissionfordeletedraft = ((GETPOST("action", "aZ09") == 'confirm_delete' && GETPOST("confirm", "aZ09") == 'yes') || GETPOST("action", "aZ09") == 'delete');
2021-02-23 21:03:23 +00:00
if ($wemustcheckpermissionforcreate || $wemustcheckpermissionfordeletedraft) {
foreach ($featuresarray as $feature) {
if ($feature == 'contact') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('societe', 'contact', 'creer')) {
2021-03-01 19:37:16 +00:00
$createok = 0;
$nbko++;
2021-02-23 21:03:23 +00:00
}
} elseif ($feature == 'produit|service') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('produit', 'creer') && !$user->hasRight('service', 'creer')) {
2021-03-01 19:37:16 +00:00
$createok = 0;
$nbko++;
2021-02-23 21:03:23 +00:00
}
} elseif ($feature == 'prelevement') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('prelevement', 'bons', 'creer')) {
2021-03-01 19:37:16 +00:00
$createok = 0;
$nbko++;
2021-02-23 21:03:23 +00:00
}
} elseif ($feature == 'commande_fournisseur') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('fournisseur', 'commande', 'creer') || !$user->hasRight('supplier_order', 'creer')) {
2021-03-01 19:37:16 +00:00
$createok = 0;
$nbko++;
2021-02-23 21:03:23 +00:00
}
} elseif ($feature == 'banque') {
2023-06-19 18:54:08 +00:00
if (!$user->hasRight('banque', 'modifier')) {
2021-03-01 19:37:16 +00:00
$createok = 0;
$nbko++;
2021-02-23 21:03:23 +00:00
}
} elseif ($feature == 'cheque') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('banque', 'cheque')) {
2021-03-01 19:37:16 +00:00
$createok = 0;
$nbko++;
2021-02-23 21:03:23 +00:00
}
2020-06-25 14:59:48 +00:00
} elseif ($feature == 'import') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('import', 'run')) {
2021-03-01 19:37:16 +00:00
$createok = 0;
$nbko++;
2021-02-23 21:03:23 +00:00
}
} elseif ($feature == 'ecm') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('ecm', 'upload')) {
2021-03-01 19:37:16 +00:00
$createok = 0;
$nbko++;
2021-02-23 21:03:23 +00:00
}
} elseif ($feature == 'modulebuilder') {
if (!$user->hasRight('modulebuilder', 'run')) {
$createok = 0;
$nbko++;
}
2026-07-20 08:52:14 +00:00
} elseif ($feature == 'payment') {
if (!$user->hasRight('facture', 'paiement')) {
$createok = 0;
$nbko++;
}
} elseif ($feature == 'webhook') {
if (empty($user->admin)) {
$createok = 0;
$nbko++;
}
} elseif (!empty($feature2)) { // This is for permissions on 2 levels (module->object->write)
foreach ($feature2 as $subfeature) {
2023-06-05 21:49:13 +00:00
if ($subfeature == 'user' && $user->id == $objectid && $user->hasRight('user', 'self', 'creer')) {
2021-02-23 21:03:23 +00:00
continue; // User can edit its own card
}
2023-06-05 21:49:13 +00:00
if ($subfeature == 'user' && $user->id == $objectid && $user->hasRight('user', 'self', 'password')) {
2021-02-23 21:03:23 +00:00
continue; // User can edit its own password
}
2023-06-05 21:49:13 +00:00
if ($subfeature == 'user' && $user->id != $objectid && $user->hasRight('user', 'user', 'password')) {
2021-10-21 16:20:06 +00:00
continue; // User can edit another user's password
}
2020-02-12 16:28:18 +00:00
2023-10-15 13:32:35 +00:00
if (!$user->hasRight($feature, $subfeature, 'creer')
&& !$user->hasRight($feature, $subfeature, 'write')
&& !$user->hasRight($feature, $subfeature, 'create')) {
$createok = 0;
2019-10-27 10:53:20 +00:00
$nbko++;
} else {
$createok = 1;
2019-10-27 10:53:20 +00:00
// Break to bypass second test if the first is ok
break;
}
}
} elseif (!empty($feature)) { // This is for permissions on 1 levels (module->write)
//print '<br>feature='.$feature.' creer='.$user->rights->$feature->creer.' write='.$user->rights->$feature->write; exit;
2023-10-15 13:32:35 +00:00
if (!$user->hasRight($feature, 'creer')
&& !$user->hasRight($feature, 'write')
&& !$user->hasRight($feature, 'create')) {
$createok = 0;
2019-10-27 10:53:20 +00:00
$nbko++;
}
}
}
// If a or and at least one ok
2021-02-23 21:03:23 +00:00
if (preg_match('/\|/', $features) && $nbko < count($featuresarray)) {
$createok = 1;
}
2021-02-23 21:03:23 +00:00
if ($wemustcheckpermissionforcreate && !$createok) {
if ($mode) {
return 0;
} else {
accessforbidden();
}
2021-02-23 21:03:23 +00:00
}
//print "Write access is ok";
}
// Check create user permission
$createuserok = 1;
2021-02-23 21:03:23 +00:00
if (GETPOST('action', 'aZ09') == 'confirm_create_user' && GETPOST("confirm", 'aZ09') == 'yes') {
2023-06-19 18:08:27 +00:00
if (!$user->hasRight('user', 'user', 'creer')) {
2021-02-23 21:03:23 +00:00
$createuserok = 0;
}
2021-02-23 21:03:23 +00:00
if (!$createuserok) {
if ($mode) {
return 0;
} else {
accessforbidden();
}
2021-02-23 21:03:23 +00:00
}
//print "Create user access is ok";
}
// Check delete permission from module
2021-03-01 19:37:16 +00:00
$deleteok = 1;
$nbko = 0;
2021-02-23 21:03:23 +00:00
if ((GETPOST("action", "aZ09") == 'confirm_delete' && GETPOST("confirm", "aZ09") == 'yes') || GETPOST("action", "aZ09") == 'delete') {
foreach ($featuresarray as $feature) {
2023-02-03 23:18:30 +00:00
if ($feature == 'bookmark') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('bookmark', 'supprimer')) {
if ($user->id != $object->fk_user || !$user->hasRight('bookmark', 'creer')) {
2023-02-03 23:18:30 +00:00
$deleteok = 0;
}
}
} elseif ($feature == 'contact') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('societe', 'contact', 'supprimer')) {
2021-02-23 21:03:23 +00:00
$deleteok = 0;
}
2021-02-23 21:03:23 +00:00
} elseif ($feature == 'produit|service') {
2023-06-14 18:23:21 +00:00
if (!$user->hasRight('produit', 'supprimer') && !$user->hasRight('service', 'supprimer')) {
2021-02-23 21:03:23 +00:00
$deleteok = 0;
}
} elseif ($feature == 'commande_fournisseur') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('fournisseur', 'commande', 'supprimer')) {
2021-02-23 21:03:23 +00:00
$deleteok = 0;
}
2021-10-31 16:06:37 +00:00
} elseif ($feature == 'payment_supplier') { // Permission to delete a payment of an invoice is permission to edit an invoice.
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('fournisseur', 'facture', 'creer')) {
$deleteok = 0;
}
2022-05-22 00:30:35 +00:00
} elseif ($feature == 'payment') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('facture', 'paiement')) {
2023-12-04 11:05:28 +00:00
$deleteok = 0;
2021-10-26 14:56:56 +00:00
}
2023-01-03 18:16:38 +00:00
} elseif ($feature == 'payment_sc') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('tax', 'charges', 'creer')) {
2023-01-03 18:16:38 +00:00
$deleteok = 0;
}
2021-02-23 21:03:23 +00:00
} elseif ($feature == 'banque') {
2023-06-19 18:54:08 +00:00
if (!$user->hasRight('banque', 'modifier')) {
2021-02-23 21:03:23 +00:00
$deleteok = 0;
}
} elseif ($feature == 'cheque') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('banque', 'cheque')) {
2021-02-23 21:03:23 +00:00
$deleteok = 0;
}
} elseif ($feature == 'ecm') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('ecm', 'upload')) {
2021-02-23 21:03:23 +00:00
$deleteok = 0;
}
} elseif ($feature == 'ftp') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('ftp', 'write')) {
2021-02-23 21:03:23 +00:00
$deleteok = 0;
}
} elseif ($feature == 'salaries') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('salaries', 'delete')) {
2021-02-23 21:03:23 +00:00
$deleteok = 0;
}
} elseif ($feature == 'adherent') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('adherent', 'supprimer')) {
2021-02-23 21:03:23 +00:00
$deleteok = 0;
}
} elseif ($feature == 'paymentbybanktransfer') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('paymentbybanktransfer', 'create')) { // There is no delete permission
$deleteok = 0;
}
} elseif ($feature == 'prelevement') {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('prelevement', 'bons', 'creer')) { // There is no delete permission
$deleteok = 0;
}
2021-02-23 21:03:23 +00:00
} elseif (!empty($feature2)) { // This is for permissions on 2 levels
foreach ($feature2 as $subfeature) {
2023-10-15 13:32:35 +00:00
if (!$user->hasRight($feature, $subfeature, 'supprimer') && !$user->hasRight($feature, $subfeature, 'delete')) {
2021-02-23 21:03:23 +00:00
$deleteok = 0;
} else {
2021-03-01 19:37:16 +00:00
$deleteok = 1;
break;
2021-02-23 21:03:23 +00:00
} // For bypass the second test if the first is ok
}
2021-02-23 21:03:23 +00:00
} elseif (!empty($feature)) { // This is used for permissions on 1 level
//print '<br>feature='.$feature.' creer='.$user->rights->$feature->supprimer.' write='.$user->rights->$feature->delete;
2023-10-15 13:32:35 +00:00
if (!$user->hasRight($feature, 'supprimer')
&& !$user->hasRight($feature, 'delete')
&& !$user->hasRight($feature, 'run')) {
2021-02-23 21:03:23 +00:00
$deleteok = 0;
}
}
}
// If a or and at least one ok
2021-02-23 21:03:23 +00:00
if (preg_match('/\|/', $features) && $nbko < count($featuresarray)) {
$deleteok = 1;
}
2021-02-23 21:03:23 +00:00
if (!$deleteok && !($isdraft && $createok)) {
if ($mode) {
return 0;
} else {
accessforbidden();
}
2021-02-23 21:03:23 +00:00
}
//print "Delete access is ok";
}
// If we have a particular object to check permissions on, we check if $user has permission
// for this given object (link to company, is contact for project, ...)
2021-02-23 21:03:23 +00:00
if (!empty($objectid) && $objectid > 0) {
2022-12-05 02:08:57 +00:00
$ok = checkUserAccessToObject($user, $featuresarray, $object, $tableandshare, $feature2, $dbt_keyfield, $dbt_select, $parentfortableentity);
Qual: Apply automatic phan fixes (deprecations, unneeded imports) (#28154) * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports). * Qual: Apply automatic phan fixes (deprecations, unneeded imports) # Qual: Apply automatic phan fixes (deprecations, unneeded imports) This applies automatic fixes by phan for deprecated functions, unneeded imports).
2024-02-13 20:46:12 +00:00
$params = array('objectid' => $objectid, 'features' => implode(',', $featuresarray), 'features2' => $feature2);
2021-04-29 10:10:55 +00:00
//print 'checkUserAccessToObject ok='.$ok;
if ($mode) {
return $ok ? 1 : 0;
} else {
2022-12-31 13:01:03 +00:00
if ($ok) {
return 1;
} else {
accessforbidden('', 1, 1, 0, $params);
}
}
}
return 1;
}
/**
2022-01-13 14:52:41 +00:00
* Check that access by a given user to an object is ok.
* This function is also called by restrictedArea() that check before if module is enabled and if permission of user for $action is ok.
*
2022-01-13 14:52:41 +00:00
* @param User $user User to check
Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp (#30557) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Update phan baseline (remove PhanTypeInvalidLeftOperandOfNumericOp) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Fix: Change argument '' to null as by getAvailableDiscounts signature * Qual: Cast '' to float for Phan notice * Fix: Convert $number with price2num before using this parameter * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Add cast to ensure fmod is presented with floats
2024-08-15 14:57:02 +00:00
* @param string[] $featuresarray Features/modules to check. Example: ('user','service','member','project','task',...)
2026-07-17 09:28:00 +00:00
* @param int|string|Object $object Object (recommended) or Object ID or list of Object id. For example if we want to check a particular record (optional) is linked to a owned thirdparty (optional).
2022-01-13 14:52:41 +00:00
* @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity for multicompany modume. Param not used if objectid is null (optional).
Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp (#30557) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Update phan baseline (remove PhanTypeInvalidLeftOperandOfNumericOp) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Fix: Change argument '' to null as by getAvailableDiscounts signature * Qual: Cast '' to float for Phan notice * Fix: Convert $number with price2num before using this parameter * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Add cast to ensure fmod is presented with floats
2024-08-15 14:57:02 +00:00
* @param string[]|string $feature2 Feature to check, second level of permission (optional). Can be or check with 'level1|level2'.
2022-12-05 02:08:57 +00:00
* @param string $dbt_keyfield Field name for socid foreign key if not fk_soc. Not used if objectid is null (optional). Can use '' if NA.
* @param string $dbt_select Field name for select if not rowid. Not used if objectid is null (optional).
2022-01-13 14:52:41 +00:00
* @param string $parenttableforentity Parent table for entity. Example 'fk_website@website'
* @return bool True if user has access, False otherwise
2019-03-11 00:01:15 +00:00
* @see restrictedArea()
*/
2022-01-13 14:52:41 +00:00
function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tableandshare = '', $feature2 = '', $dbt_keyfield = '', $dbt_select = 'rowid', $parenttableforentity = '')
{
global $db, $conf;
2022-01-13 14:52:41 +00:00
if (is_object($object)) {
$objectid = $object->id;
} else {
$objectid = $object; // $objectid can be X or 'X,Y,Z'
}
2026-07-17 09:28:00 +00:00
$objectid = preg_replace('/[^0-9\.\,]/', '', (string) $objectid); // For the case value is coming from a non sanitized user input
2022-01-13 14:52:41 +00:00
2026-07-17 09:28:00 +00:00
//dol_syslog("functions.lib:restrictedArea $feature, $object, $dbtablename, $feature2, $dbt_socfield, $dbt_select, $isdraft");
//print "user_id=".$user->id.", features=".join(',', $featuresarray).", object=".$object;
2021-03-23 17:08:44 +00:00
//print ", tableandshare=".$tableandshare.", dbt_socfield=".$dbt_keyfield.", dbt_select=".$dbt_select."<br>";
// More parameters
2015-05-13 07:32:54 +00:00
$params = explode('&', $tableandshare);
$dbtablename = (!empty($params[0]) ? $params[0] : '');
$sharedelement = (!empty($params[1]) ? $params[1] : $dbtablename);
2021-02-23 21:03:23 +00:00
foreach ($featuresarray as $feature) {
$sql = '';
2022-01-10 18:23:46 +00:00
//var_dump($feature);exit;
2021-04-02 21:23:44 +00:00
2017-02-03 10:42:49 +00:00
// For backward compatibility
2023-06-29 11:16:44 +00:00
if ($feature == 'societe' && !empty($feature2) && is_array($feature2) && in_array('contact', $feature2)) {
2023-06-29 10:10:31 +00:00
$feature = 'contact';
$feature2 = '';
}
2021-02-23 21:03:23 +00:00
if ($feature == 'member') {
$feature = 'adherent';
}
if ($feature == 'category') {
$feature = 'categorie';
}
2021-02-23 21:03:23 +00:00
if ($feature == 'project') {
$feature = 'projet';
}
if ($feature == 'projet' && !empty($feature2) && is_array($feature2) && !empty(array_intersect(array('project_task', 'projet_task'), $feature2))) {
$feature = 'project_task';
}
if ($feature == 'task' || $feature == 'projet_task') {
$feature = 'project_task';
$dbtablename = 'projet_task';
2021-02-23 21:03:23 +00:00
}
2023-05-10 02:11:41 +00:00
if ($feature == 'eventorganization') {
$feature = 'agenda';
$dbtablename = 'actioncomm';
}
if ($feature == 'payment_sc' && empty($parenttableforentity)) {
// If we check perm on payment page but $parenttableforentity not defined, we force value on parent table
$parenttableforentity = '';
$dbtablename = "chargesociales";
$feature = "chargesociales";
2026-07-17 09:28:00 +00:00
$objectid = (string) $object->fk_charge;
}
2023-06-03 11:56:06 +00:00
2022-01-13 14:52:41 +00:00
$checkonentitydone = 0;
// Array to define rules of checks to do
$check = array('adherent', 'banque', 'bom', 'don', 'mrp', 'user', 'usergroup', 'payment', 'payment_supplier', 'payment_sc', 'product', 'produit', 'service', 'produit|service', 'categorie', 'resource', 'expensereport', 'holiday', 'salaries', 'website', 'recruitment', 'chargesociales', 'knowledgemanagement', 'stock'); // Test on entity only (Objects with no link to company)
2022-12-05 02:08:57 +00:00
$checksoc = array('societe'); // Test for object Societe
2023-06-29 10:10:31 +00:00
$checkparentsoc = array('agenda', 'contact', 'contrat'); // Test on entity + link to third party on field $dbt_keyfield. Allowed if link is empty (Ex: contacts...).
$checkproject = array('projet', 'project'); // Test for project object
$checktask = array('projet_task', 'project_task'); // Test for task object
$checkhierarchy = array('expensereport', 'holiday', 'hrm'); // check permission among the hierarchy of user
2023-02-04 09:58:00 +00:00
$checkuser = array('bookmark'); // check permission among the fk_user (must be myself or null)
$nocheck = array('barcode', 'webhook'); // No test
2022-12-05 02:08:57 +00:00
//$checkdefault = 'all other not already defined'; // Test on entity + link to third party on field $dbt_keyfield. Not allowed if link is empty (Ex: invoice, orders...).
// If dbtablename not defined, we use same name for table than module name
2021-02-23 21:03:23 +00:00
if (empty($dbtablename)) {
$dbtablename = $feature;
$sharedelement = (!empty($params[1]) ? $params[1] : $dbtablename); // We change dbtablename, so we set sharedelement too.
}
NEW Drag and drop a file on the 23 remaining cards (#39473) * FIX Drag and drop of a file reports a wrong error, or none at all The error handler of dragAndDropFileUpload() had three defects that all end on the user believing the file was attached when it was not. - The first assignment of the message was dead code, there was no return after the test on the http code 403, so a refusal was reported as a generic error. - The key ErrorUploadPermissionDenied it used exists in no language file, so the raw key was shown. - JSON.parse() was called with no try/catch on an answer that is not always a json, a fatal error of the endpoint or a request over post_max_size for example. The exception left the user on a page with no message at all. - An empty list of files was treated as a success, while it means the endpoint stored nothing. The value of PHP_SELF is also escaped before it is written into the 6 generated javascript strings. It holds the path info of the request on a server that accepts it, so it is a user input. dol_escape_js() is called with the mode that escapes a double quote by a double quote, the strings being delimited by double quotes, and the sequence '</' is escaped too because the function does not do it and the path info could otherwise close the script tag and open one of its own. Adds the key ErrorOnAtLeastOneFileUpload to en_US, used when some files of a batch failed and some did not. * FIX getMultidirOutput returns a directory the Documents tab does not read Four defects of the same function, all ending on a file stored where the user will never see it, or written outside the documents directory. - The ref of the project of a task was only passed through dol_sanitizePathName(), which keeps a slash, a colon and the accented chars, while projet/tasks/document.php sanitizes it with dol_sanitizeFileName(). A project ref holding a slash even created an extra level of directory. Measured on real databases: 304 projects over 330 hold a slash on one of them, carrying 701 tasks over 824. - The same case calls $object->fetchProject() with no guard, while the signature of the function accepts an object that is not a CommonObject, and even a null when a module is given. Such a caller gets a fatal error where it expects the error string. No core caller is in that case today, an external module or a hook can be. - The entity of the object may have no declared directory, an object shared by another entity for example. The undefined index returned a relative path, so the caller read or wrote under the web root. The current entity is used instead, and the fallback is logged because the directory is then not the one of the entity of the object, which matters for a caller that deletes files. - When the current entity has no declared directory either, the fallback returned the sub directory alone, again a relative path. The same error than for a module that declares no directory at all is now returned. Adds the sub directory of a partnership and of a stock transfer, which their own document tabs already read. * FIX getElementProperties answers wrong properties for 9 elements A customer payment, a supplier payment, a various payment, a stock transfer and the 4 objects of the hrm module had no properties at all, or wrong ones, so any caller that resolves a class, a table or a document directory from an element failed on them. - payment, payment_supplier and payment_various had no branch. The branch of a customer payment tests $elementType and not $element, because the rule on the elements named myobject_mysubobject rewrites $element to 'payment' for 'payment_salary' too, which is stored somewhere else. - job, position, skill and evaluation answered a wrong table (hrm_job_user for a position, and so on) and no sub directory, while their document tabs read one named after the element. - stocktransfer answered an empty classname, because it is not the ucfirst() of the element, so a caller doing new $classname($db) ended on a fatal error. - The sub directory was concatenated even when the module is disabled and the directory is empty, which answered a path at the root of the file system. - A contact and a conference are stored into a sub directory their tab reads. isModEnabled('invoice') is tested for a customer payment: there is no module named 'compta', so testing it was always false, while $conf->compta->payment is set unconditionally by Conf::setValues() and could not be used as a proxy. * FIX Access refused to everyone on 11 objects of the core restrictedArea() and checkUserAccessToObject() refuse the access to objects that no permission and no rule can match, whatever the user, an administrator included. - The hrm module declares no permission at its first level, only 'all', and the stocktransfer module only 'stocktransfer'. A check on the module itself therefore tests a permission that does not exist. The mapping is the same one as into User::hasRight(). - The module of an event organization declares no permission at all, its whole permission block being commented out on purpose, and its cards check the parent project instead. The feature is mapped onto that project, with the two guards the card has: an external user is refused, and so is a conference with no parent project, whose id of 0 would otherwise grant an access with no check on the record at all. - The default rule of checkUserAccessToObject() builds its sql on the columns entity and fk_soc of the table. llx_asset, llx_paiement, llx_paiementfourn and llx_workstation_workstation have no fk_soc, and llx_hrm_job, llx_hrm_job_user and llx_hrm_skill have neither. The sql failed, so the access was refused to every user this rule applies to. These tables are now checked on their entity only, which is what the $check rule already does for the same class of tables, and the 3 tables of hrm can be checked on nothing at all. The rule is selected on the table and not on the element, because $object is an id and not an object for most of the callers, the cards of an asset and of a workstation included, which are broken today for any user without the permission to see all third parties. - An external user is refused explicitly on those tables: none of these objects is linked to a third party, so the default rule refused him through a link that does not exist, and the rules that replace it do not look at the third party of the user at all. Measured on a vanilla instance with 5 profiles, an administrator, an internal user with every right, one without the permission to see all third parties, one that is not a sales representative of the third party of the object, and an external user: the 11 objects go from refused to granted for the internal users and stay refused for the external one, and the 26 other elements answer exactly the same for the 5 profiles. * FIX A file dropped on a card is lost, or reported as refused when it was stored FileUpload stores the file into a directory that the "Attached files" tab of the object never reads, so the user attaches a file that no screen will ever show, and nothing is indexed in database to find it back. Measured on real databases: 216487 thirdparties over 216887 and 157852 products over 280319 are in that case on the cards that already enable the drag and drop. - The directory of the object is now forged with get_exdir(), the way the tabs do: it always uses the id for a thirdparty, whose ref is a company name and is not unique, and it falls back on the id when the ref is empty. The sub directory of the module is read with getMultidirOutput(), which knows the elements that store their documents into one. That function does not return an empty string when it fails but a string starting with 'error-', so only an absolute path is accepted: writing into that string would create the files under the web root. - fetchObjectByElement() returns an object even when fetch() returned 0. The object was then not loaded, and the file was stored at the root of the directory of the module, out of any object. The constructor now throws, and the endpoint answers the error with the same json contract than a successful call so that the caller can show it, instead of a fatal error and an http 500. - An attachment of the same name was silently overwritten, dol_move_uploaded_file() being called with $allowoverwrite = 1 while the name was checked before the ref of the object was added as a prefix. The check is done again on the final name, and on the .noexe suffixed name too, which that function appends to an executable file. - An executable file was renamed with that .noexe suffix and then reported as an error, while it was correctly stored. - The endpoint called restrictedArea() with an empty feature when the element is unknown, and the loop of that function then takes no branch at all and grants the access with no check. It refuses before, with the same http code and the same message than a refusal, so that a user cannot tell an object that exists but is not allowed from an object that does not exist. The refusal of an external user on an object of another third party answered a message of its own, which allowed the same enumeration. Comes with the tests of the path resolution, of the fallback of get_exdir(), of the rejection of the error string of getMultidirOutput(), and of the file name deduplication. * FIX Remove the drop area from 13 cards where dropping a file is harmful Two distinct groups, both of them removing a drop area that only produces a result the user does not want. 7 pages have no "Attached files" tab at all, so a file dropped on them can be reached by no screen: a fiscal year and its info page, an accounting model, a webhook trigger history, an intracomm report, a bookcal calendar and its booking list. Measured: 4 of them accepted the upload and wrote an orphan file, the accounting model wrote it at the root of the directory of the module, out of any object, and the 2 bookcal ones answered an http 500. 6 cards print their tabs inside their edit form, so the drop area covered that form: a product, an expense report, a VAT payment, a social contribution, a loan and a salary. Dropping a file there reloads the page, which discards what the user is typing. A product and an expense report have a second call for the read only view, so the drop area is only removed from the call of the edit branch; the 4 others share a single call between both views, so the parameter is now conditional. * NEW Drag and drop a file on the 23 remaining cards Every card of the core that owns an "Attached files" tab can now receive a file by drag and drop, which was the case of 32 of them only. The 23 added here are an asset, an event, a various payment, a customer payment, a contact, a donation, a conference or booth, a shipment, a supplier payment, a leave request, an evaluation, a job, a position, a skill, a knowledge record, a manufacturing order, a partnership, a lot, a stock transfer, a task, a reception, a resource and a workstation. The tab bar of a leave request and of a resource is printed inside their edit form, so the drop area is not enabled there: dropping a file reloads the page, which would discard what the user is typing. The card of a supplier payment prints its tab bar even when the object was not loaded, so the drop area is only enabled when it is. * FIX getMultidirOutput refuses an entity with no directory instead of falling back [skip-claudemd] The previous revision of this PR fell back on the directory of the current entity when the entity of the object had none, with a LOG_WARNING. On a multicompany install that made a caller read, write and above all delete files in the directory of another entity. Refuse instead: the function already answers 'error-diroutput-not-defined-for-this-object' when the module declares no directory at all, so the caller has one behaviour to handle, not two. The entity is cast to int, which is what the array index needs and what silences the four PhanTypeMismatchDimFetchNullable this function reported. --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-08-19 00:46:21 +00:00
// The default rule reads the columns entity and $dbt_keyfield of the table, but some tables own neither of
// them. The sql was then built on columns that do not exist, so it always failed and the access was refused
// to the users that this rule applies to.
// The rule is selected on the table and not on the element of the object, because $object is an id and not
// an object for most of the callers, the card of an asset and the card of a workstation included.
if (!empty($objectid) && in_array($dbtablename, array('asset', 'paiement', 'paiementfourn', 'workstation_workstation', 'hrm_job', 'hrm_job_user', 'hrm_skill'))) {
// None of these objects is linked to a third party, so an external user can own none of them. The
// default rule refused him through a link that does not exist, we must refuse him explicitly instead,
// otherwise the rules below, which do not look at the third party of the user at all, would grant it.
if (!empty($user->socid)) {
return false;
}
if (in_array($dbtablename, array('hrm_job', 'hrm_job_user', 'hrm_skill'))) {
// These 3 tables have no entity column either, so no rule that reads the table can be run on them.
// The permission is still checked by restrictedArea(), and the $checkhierarchy rule below still runs.
// Note that these 3 objects are therefore not partitioned between entities at all, in the database
// itself: their cards already answer to a user of another entity, and their lists already show the
// records of all of them. This rule does not widen that, it aligns with it.
$nocheck[] = $feature;
} else {
$check[] = $feature; // Test on the entity only, there is no third party to restrict on
}
}
2026-07-17 09:28:00 +00:00
// $objectid was already sanitized at begin of this method (can be an int or a list of int separated by comma).
2022-12-05 02:08:57 +00:00
// To avoid an access forbidden with a numeric ref
if ($dbt_select != 'rowid' && $dbt_select != 'id') {
2026-07-17 09:28:00 +00:00
$objectid = "'".$objectid."'";
2022-12-05 02:08:57 +00:00
}
2026-07-17 09:28:00 +00:00
2022-08-27 17:02:05 +00:00
// Check permission for objectid on entity only
2026-07-17 09:28:00 +00:00
if (in_array($feature, $check) && !empty($objectid)) { // For $objectid = 0, no check
2026-04-14 17:23:50 +00:00
$sql = "SELECT COUNT(dbt.".$db->sanitize($dbt_select).") as nb";
$sql .= " FROM ".MAIN_DB_PREFIX.$db->sanitize($dbtablename)." as dbt";
2022-08-28 11:58:13 +00:00
if (($feature == 'user' || $feature == 'usergroup') && isModEnabled('multicompany')) { // Special for multicompany
2023-11-27 10:39:32 +00:00
if (getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE')) {
if ($conf->entity == 1 && $user->admin && !$user->entity) {
2026-04-14 17:23:50 +00:00
$sql .= " WHERE dbt.".$db->sanitize($dbt_select)." IN (".$db->sanitize($objectid, 1).")";
$sql .= " AND dbt.entity IS NOT NULL";
2020-05-21 13:05:19 +00:00
} else {
$sql .= ",".MAIN_DB_PREFIX."usergroup_user as ug";
2026-04-14 17:23:50 +00:00
$sql .= " WHERE dbt.".$db->sanitize($dbt_select)." IN (".$db->sanitize($objectid, 1).")";
$sql .= " AND ((ug.fk_user = dbt.rowid";
$sql .= " AND ug.entity IN (".getEntity('usergroup')."))";
$sql .= " OR dbt.entity = 0)"; // Show always superadmin
}
2020-05-21 13:05:19 +00:00
} else {
2026-04-14 17:23:50 +00:00
$sql .= " WHERE dbt.".$db->sanitize($dbt_select)." IN (".$db->sanitize($objectid, 1).")";
$sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")";
}
2020-05-21 13:05:19 +00:00
} else {
2020-06-07 21:00:38 +00:00
$reg = array();
if ($parenttableforentity && preg_match('/(.*)@(.*)/', $parenttableforentity, $reg)) {
2026-04-14 17:23:50 +00:00
$sql .= ", ".MAIN_DB_PREFIX.$db->sanitize($reg[2])." as dbtp";
$sql .= " WHERE dbt.".$db->sanitize($reg[1])." = dbtp.rowid AND dbt.".$db->sanitize($dbt_select)." IN (".$db->sanitize($objectid, 1).")";
2020-06-07 21:00:38 +00:00
$sql .= " AND dbtp.entity IN (".getEntity($sharedelement, 1).")";
} else {
2026-04-14 17:23:50 +00:00
$sql .= " WHERE dbt.".$db->sanitize($dbt_select)." IN (".$db->sanitize($objectid, 1).")";
2020-06-07 21:00:38 +00:00
$sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")";
}
}
2022-01-13 14:52:41 +00:00
$checkonentitydone = 1;
}
2026-07-17 09:28:00 +00:00
if (in_array($feature, $checksoc) && !empty($objectid)) { // We check feature = checksoc. For $objectid = 0, no check
// If external user: Check permission for external users
if ($user->socid > 0) {
2026-07-17 09:28:00 +00:00
if ((string) $user->socid != $objectid) {
2021-03-11 15:37:27 +00:00
return false;
}
2025-11-25 17:11:11 +00:00
} elseif (isModEnabled('societe') && !$user->hasRight('societe', 'lire') && !$user->hasRight('societe', 'client', 'voir')) {
dol_syslog("security.lib.php::checkUserAccessToObject Deny access due: (isModEnabled('societe') && !user->hasRight('societe', 'lire') && !user->hasRight('societe', 'client', 'voir'))", LOG_DEBUG);
return false;
2023-10-15 13:32:35 +00:00
} elseif (isModEnabled("societe") && ($user->hasRight('societe', 'lire') && !$user->hasRight('societe', 'client', 'voir'))) {
2021-03-11 15:37:27 +00:00
// If internal user: Check permission for internal users that are restricted on their objects
$sql = "SELECT COUNT(sc.fk_soc) as nb";
$sql .= " FROM (".MAIN_DB_PREFIX."societe_commerciaux as sc";
$sql .= ", ".MAIN_DB_PREFIX."societe as s)";
2021-03-22 10:30:18 +00:00
$sql .= " WHERE sc.fk_soc IN (".$db->sanitize($objectid, 1).")";
$sql .= " AND (sc.fk_user = ".((int) $user->id);
if (getDolGlobalInt('MAIN_SEE_SUBORDINATES')) {
$userschilds = $user->getAllChildIds();
if (!empty($userschilds)) $sql .= " OR sc.fk_user IN (".$db->sanitize(implode(',', $userschilds)).")";
}
$sql .= ")";
$sql .= " AND sc.fk_soc = s.rowid";
$sql .= " AND s.entity IN (".getEntity($sharedelement, 1).")";
2022-08-28 11:58:13 +00:00
} elseif (isModEnabled('multicompany')) {
// If multicompany and internal users with all permissions, check user is in correct entity
$sql = "SELECT COUNT(s.rowid) as nb";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
2021-03-22 10:30:18 +00:00
$sql .= " WHERE s.rowid IN (".$db->sanitize($objectid, 1).")";
$sql .= " AND s.entity IN (".getEntity($sharedelement, 1).")";
}
2022-01-13 14:52:41 +00:00
$checkonentitydone = 1;
}
2026-07-17 09:28:00 +00:00
if (in_array($feature, $checkparentsoc) && !empty($objectid)) { // Test on entity + link to thirdparty. Allowed if link is empty (Ex: contacts...).
// If external user: Check permission for external users
2021-02-23 21:03:23 +00:00
if ($user->socid > 0) {
2026-04-14 17:23:50 +00:00
$sql = "SELECT COUNT(dbt.".$db->sanitize($dbt_select).") as nb";
$sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
2026-04-14 17:23:50 +00:00
$sql .= " WHERE dbt.".$db->sanitize($dbt_select)." IN (".$db->sanitize($objectid, 1).")";
$sql .= " AND dbt.fk_soc = ".((int) $user->socid);
2023-10-15 13:32:35 +00:00
} elseif (isModEnabled("societe") && ($user->hasRight('societe', 'lire') && !$user->hasRight('societe', 'client', 'voir'))) {
2021-03-01 19:37:16 +00:00
// If internal user: Check permission for internal users that are restricted on their objects
2026-04-14 17:23:50 +00:00
$sql = "SELECT COUNT(dbt.".$db->sanitize($dbt_select).") as nb";
$sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
2020-09-19 20:41:05 +00:00
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON dbt.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id);
2026-04-14 17:23:50 +00:00
$sql .= " WHERE dbt.".$db->sanitize($dbt_select)." IN (".$db->sanitize($objectid, 1).")";
$sql .= " AND (dbt.fk_soc IS NULL OR sc.fk_soc IS NOT NULL)"; // Contact not linked to a company or to a company of user
$sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")";
2022-08-28 11:58:13 +00:00
} elseif (isModEnabled('multicompany')) {
2021-03-01 19:37:16 +00:00
// If multicompany and internal users with all permissions, check user is in correct entity
2026-04-14 17:23:50 +00:00
$sql = "SELECT COUNT(dbt.".$db->sanitize($dbt_select).") as nb";
$sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
2026-04-14 17:23:50 +00:00
$sql .= " WHERE dbt.".$db->sanitize($dbt_select)." IN (".$db->sanitize($objectid, 1).")";
$sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")";
}
2022-01-13 14:52:41 +00:00
$checkonentitydone = 1;
}
2026-07-17 09:28:00 +00:00
if (in_array($feature, $checkproject) && !empty($objectid)) {
2023-10-15 13:32:35 +00:00
if (isModEnabled('project') && !$user->hasRight('projet', 'all', 'lire')) {
2026-07-17 09:28:00 +00:00
$projectid = $objectid; // Note that if $objectid is a string list of id; the test later will return false
2022-01-13 14:52:41 +00:00
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
$projectstatic = new Project($db);
$tmps = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1, 0);
$tmparray = explode(',', $tmps);
2022-01-13 14:52:41 +00:00
if (!in_array($projectid, $tmparray)) {
2021-02-23 21:03:23 +00:00
return false;
}
2020-05-21 13:05:19 +00:00
} else {
2026-04-14 17:23:50 +00:00
$sql = "SELECT COUNT(dbt.".$db->sanitize($dbt_select).") as nb";
$sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
2026-04-14 17:23:50 +00:00
$sql .= " WHERE dbt.".$db->sanitize($dbt_select)." IN (".$db->sanitize($objectid, 1).")";
$sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")";
}
2022-01-13 14:52:41 +00:00
$checkonentitydone = 1;
}
2026-07-17 09:28:00 +00:00
if (in_array($feature, $checktask) && !empty($objectid)) {
2023-10-15 13:32:35 +00:00
if (isModEnabled('project') && !$user->hasRight('projet', 'all', 'lire')) {
2026-07-17 09:28:00 +00:00
if (preg_match('/,/', $objectid)) { // if this is a list of id
return false;
}
$task = new Task($db);
2025-02-10 20:20:09 +00:00
$task->fetch((int) $objectid);
2022-01-13 14:52:41 +00:00
$projectid = $task->fk_project;
2017-06-01 17:53:12 +00:00
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
$projectstatic = new Project($db);
$tmps = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1, 0);
2022-01-13 14:52:41 +00:00
$tmparray = explode(',', $tmps);
2022-01-13 14:52:41 +00:00
if (!in_array($projectid, $tmparray)) {
2021-02-23 21:03:23 +00:00
return false;
}
2020-05-21 13:05:19 +00:00
} else {
2025-10-16 17:33:38 +00:00
$sharedelement = 'project'; // for multicompany compatibility
2026-04-14 17:23:50 +00:00
$sql = "SELECT COUNT(dbt.".$db->sanitize($dbt_select).") as nb";
$sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
2026-04-14 17:23:50 +00:00
$sql .= " WHERE dbt.".$db->sanitize($dbt_select)." IN (".$db->sanitize($objectid, 1).")";
$sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")";
}
2022-01-13 14:52:41 +00:00
$checkonentitydone = 1;
}
2023-06-03 11:56:06 +00:00
//var_dump($sql);
2023-04-27 14:19:35 +00:00
2026-07-17 09:28:00 +00:00
if (!$checkonentitydone && !in_array($feature, $nocheck) && !empty($objectid)) { // By default (case of $checkdefault), we check on object entity + link to third party on field $dbt_keyfield
// If external user: Check permission for external users
if ($user->socid > 0) {
2021-02-23 21:03:23 +00:00
if (empty($dbt_keyfield)) {
2024-01-20 08:22:38 +00:00
dol_print_error(null, 'Param dbt_keyfield is required but not defined');
2021-02-23 21:03:23 +00:00
}
2026-04-14 17:23:50 +00:00
$sql = "SELECT COUNT(dbt.".$db->sanitize($dbt_keyfield).") as nb";
$sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
2021-03-22 10:30:18 +00:00
$sql .= " WHERE dbt.rowid IN (".$db->sanitize($objectid, 1).")";
2026-04-14 17:23:50 +00:00
$sql .= " AND dbt.".$db->sanitize($dbt_keyfield)." = ".((int) $user->socid);
2023-10-15 13:32:35 +00:00
} elseif (isModEnabled("societe") && !$user->hasRight('societe', 'client', 'voir')) {
2023-04-27 14:19:35 +00:00
// If internal user without permission to see all thirdparties: Check permission for internal users that are restricted on their objects
if (empty($dbt_keyfield)) {
dol_print_error(null, 'Param dbt_keyfield is required but not defined');
}
if ($feature != 'ticket') {
$sql = "SELECT COUNT(sc.fk_soc) as nb";
2026-04-14 17:23:50 +00:00
$sql .= " FROM ".MAIN_DB_PREFIX.$db->sanitize($dbtablename)." as dbt";
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
2026-04-14 17:23:50 +00:00
$sql .= " WHERE dbt.".$db->sanitize($dbt_select)." IN (".$db->sanitize($objectid, 1).")";
$sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")";
2026-04-14 17:23:50 +00:00
$sql .= " AND sc.fk_soc = dbt.".$db->sanitize($dbt_keyfield);
$sql .= " AND (sc.fk_user = ".((int) $user->id);
if (getDolGlobalInt('MAIN_SEE_SUBORDINATES')) {
$userschilds = $user->getAllChildIds();
if (!empty($userschilds)) $sql .= " OR sc.fk_user IN (".$db->sanitize(implode(',', $userschilds)).")";
}
$sql .= ')';
} else {
2021-02-10 13:04:06 +00:00
// On ticket, the thirdparty is not mandatory, so we need a special test to accept record with no thirdparties.
2026-04-14 17:23:50 +00:00
$sql = "SELECT COUNT(dbt.".$db->sanitize($dbt_select).") as nb";
$sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
2026-04-14 17:23:50 +00:00
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = dbt.".$db->sanitize($dbt_keyfield)." AND sc.fk_user = ".((int) $user->id);
$sql .= " WHERE dbt.".$db->sanitize($dbt_select)." IN (".$db->sanitize($objectid, 1).")";
$sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")";
$sql .= " AND (sc.fk_user = ".((int) $user->id)." OR dbt.".$dbt_keyfield." IS NULL OR dbt.".$dbt_keyfield." = 0)";
}
} elseif (isModEnabled('multicompany') && (!empty($object->ismultientitymanaged) || !isset($object->ismultientitymanaged))) {
2023-04-27 14:19:35 +00:00
// If multicompany, and user is an internal user with all permissions, check that object is in correct entity
2026-04-14 17:23:50 +00:00
$sql = "SELECT COUNT(dbt.".$db->sanitize($dbt_select).") as nb";
$sql .= " FROM ".MAIN_DB_PREFIX.$db->sanitize($dbtablename)." as dbt";
$sql .= " WHERE dbt.".$db->sanitize($dbt_select)." IN (".$db->sanitize($objectid, 1).")";
$sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")";
}
}
2022-01-13 14:52:41 +00:00
// For events, check on users assigned to event
2026-07-17 09:28:00 +00:00
if ($feature === 'agenda' && !empty($objectid)) {
2022-01-13 14:52:41 +00:00
// Also check owner or attendee for users without allactions->read
2026-07-17 09:28:00 +00:00
if (!$user->hasRight('agenda', 'allactions', 'read')) {
if (preg_match('/,/', $objectid)) { // if this is a list of id
return false;
}
2022-01-13 14:52:41 +00:00
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
$action = new ActionComm($db);
$action->fetch((int) $objectid);
2022-01-13 14:52:41 +00:00
if ($action->authorid != $user->id && $action->userownerid != $user->id && !(array_key_exists($user->id, $action->userassigned))) {
return false;
}
}
}
// For some object, we also have to check it is in the user hierarchy
// Param $object must be the full object and not a simple id to have this test possible.
2026-07-17 09:28:00 +00:00
if (in_array($feature, $checkhierarchy) && is_object($object) && !empty($objectid)) {
2022-01-13 14:52:41 +00:00
$childids = $user->getAllChildIds(1);
$useridtocheck = 0;
if ($feature == 'holiday') {
$useridtocheck = $object->fk_user;
if (!$user->hasRight('holiday', 'readall') && !in_array($useridtocheck, $childids) && !in_array($object->fk_validator, $childids)) {
2022-01-13 14:52:41 +00:00
return false;
}
}
if ($feature == 'expensereport') {
$useridtocheck = $object->fk_user_author;
2023-10-15 13:32:35 +00:00
if (!$user->hasRight('expensereport', 'readall')) {
2022-02-15 08:51:28 +00:00
if (!in_array($useridtocheck, $childids)) {
return false;
}
2022-01-13 14:52:41 +00:00
}
}
if ($feature == 'hrm' && in_array('evaluation', $feature2)) {
$useridtocheck = $object->fk_user;
if ($user->hasRight('hrm', 'evaluation', 'readall')) {
// the user can view evaluations for anyone
return true;
}
if (!$user->hasRight('hrm', 'evaluation', 'read')) {
// the user can't view any evaluations
return false;
}
2025-11-25 17:47:18 +00:00
// the user can only see their own evaluations or their subordinates'
return in_array($useridtocheck, $childids);
}
2022-01-13 14:52:41 +00:00
}
2023-02-04 09:58:00 +00:00
// For some object, we also have to check it is public or owned by user
// Param $object must be the full object and not a simple id to have this test possible.
2026-07-17 09:28:00 +00:00
if (in_array($feature, $checkuser) && is_object($object) && !empty($objectid)) {
2023-02-04 09:58:00 +00:00
$useridtocheck = $object->fk_user;
if (!empty($useridtocheck) && $useridtocheck > 0 && $useridtocheck != $user->id && empty($user->admin)) {
return false;
}
}
2021-02-23 21:03:23 +00:00
if ($sql) {
$resql = $db->query($sql);
2021-02-23 21:03:23 +00:00
if ($resql) {
$obj = $db->fetch_object($resql);
2026-07-17 09:28:00 +00:00
if (!$obj || $obj->nb < count(explode(',', $objectid))) { // error if we found 0 or less record than the nb of ids provided
2021-02-23 21:03:23 +00:00
return false;
}
2020-05-21 13:05:19 +00:00
} else {
2025-11-25 17:11:11 +00:00
dol_syslog("Bad forged sql in security.lib.php::checkUserAccessToObject", LOG_WARNING);
return false;
}
}
}
2020-06-07 21:00:38 +00:00
2025-11-25 17:11:11 +00:00
dol_syslog("security.lib.php::checkUserAccessToObject::return True", LOG_DEBUG);
return true;
}
/**
* Show a message to say access is forbidden and stop program.
* This includes only HTTP header.
* Calling this function terminate execution of PHP.
*
2022-09-09 11:58:54 +00:00
* @param string $message Force error message
* @param int $http_response_code HTTP response code (403 for forbidden access, 400 bad parameters or request)
Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp (#30557) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Update phan baseline (remove PhanTypeInvalidLeftOperandOfNumericOp) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Fix: Change argument '' to null as by getAvailableDiscounts signature * Qual: Cast '' to float for Phan notice * Fix: Convert $number with price2num before using this parameter * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Add cast to ensure fmod is presented with floats
2024-08-15 14:57:02 +00:00
* @param int<0,1> $stringalreadysanitized 1 if string is already sanitized with HTML entities
* @return never
* @see accessforbidden()
*/
2024-01-15 19:41:32 +00:00
function httponly_accessforbidden($message = '1', $http_response_code = 403, $stringalreadysanitized = 0)
{
2022-09-09 11:58:54 +00:00
top_httphead();
http_response_code($http_response_code);
2022-09-09 11:58:54 +00:00
if ($stringalreadysanitized) {
print $message;
} else {
print htmlentities($message);
}
exit(1);
}
/**
* Show a message to say access is forbidden and stop program.
2022-09-09 11:58:54 +00:00
* This includes HTTP and HTML header and footer (except if $printheader and $printfooter is 0, use this case inside an already started page).
* Calling this function terminate execution of PHP.
*
* @param string $message Force error message
* @param int<0,1> $printheader Show header before
* @param int<0,1> $printfooter Show footer after
* @param int<0,1> $showonlymessage Show only message parameter. Otherwise add more information.
* @param ?array<string,mixed> $params More parameters provided to hook
* @return never
* @see httponly_accessforbidden()
*/
function accessforbidden($message = '', $printheader = 1, $printfooter = 1, $showonlymessage = 0, $params = null)
{
global $conf, $db, $user, $langs, $hookmanager;
global $action, $object;
2021-02-23 21:03:23 +00:00
if (!is_object($langs)) {
include_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php';
$langs = new Translate('', $conf);
$langs->setDefaultLang();
}
2023-08-09 14:02:27 +00:00
$langs->loadLangs(array("main", "errors"));
if ($printheader && !defined('NOHEADERNOFOOTER')) {
2021-02-23 21:03:23 +00:00
if (function_exists("llxHeader")) {
llxHeader('');
} elseif (function_exists("llxHeaderVierge")) {
llxHeaderVierge('');
}
2023-08-09 14:02:27 +00:00
print '<div style="padding: 20px">';
}
print '<div class="error">';
2022-09-09 11:58:54 +00:00
if (empty($message)) {
2021-02-23 21:03:23 +00:00
print $langs->trans("ErrorForbidden");
} else {
print $langs->trans($message);
2021-02-23 21:03:23 +00:00
}
print '</div>';
print '<br>';
2021-02-23 21:03:23 +00:00
if (empty($showonlymessage)) {
if (empty($hookmanager)) {
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
2019-06-04 10:48:06 +00:00
$hookmanager = new HookManager($db);
// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
2019-06-04 10:48:06 +00:00
$hookmanager->initHooks(array('main'));
}
$parameters = array('message' => $message, 'params' => $params);
$reshook = $hookmanager->executeHooks('getAccessForbiddenMessage', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
2019-06-04 10:48:06 +00:00
print $hookmanager->resPrint;
2021-02-23 21:03:23 +00:00
if (empty($reshook)) {
2021-12-10 11:36:51 +00:00
$langs->loadLangs(array("errors"));
2021-02-23 21:03:23 +00:00
if ($user->login) {
print $langs->trans("CurrentLogin").': <span class="error">'.$user->login.'</span><br>';
2019-06-04 17:18:20 +00:00
print $langs->trans("ErrorForbidden2", $langs->transnoentitiesnoconv("Home"), $langs->transnoentitiesnoconv("Users"));
2021-12-10 11:36:51 +00:00
print $langs->trans("ErrorForbidden4");
2020-05-21 13:05:19 +00:00
} else {
2019-06-04 10:48:06 +00:00
print $langs->trans("ErrorForbidden3");
}
}
}
if ($printfooter && !defined('NOHEADERNOFOOTER') && function_exists("llxFooter")) {
2023-08-09 14:02:27 +00:00
print '</div>';
2021-02-23 21:03:23 +00:00
llxFooter();
}
2026-05-22 10:20:50 +00:00
// End PHP
exit(0);
}
2022-06-19 17:02:16 +00:00
/**
* Return the max allowed for file upload.
* Analyze among: upload_max_filesize, post_max_size, MAIN_UPLOAD_DOC
*
Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp (#30557) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Update phan baseline (remove PhanTypeInvalidLeftOperandOfNumericOp) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Fix: Change argument '' to null as by getAvailableDiscounts signature * Qual: Cast '' to float for Phan notice * Fix: Convert $number with price2num before using this parameter * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Add cast to ensure fmod is presented with floats
2024-08-15 14:57:02 +00:00
* @return array{max:string,maxmin:mixed,maxphptoshow:int|string,maxphptoshowparam:''|'post_max_size'|'upload_max_filesize'} Array with all max sizes for file upload
2022-06-19 17:02:16 +00:00
*/
function getMaxFileSizeArray()
{
2024-01-05 03:18:53 +00:00
$max = getDolGlobalString('MAIN_UPLOAD_DOC'); // In Kb
2024-01-09 20:37:53 +00:00
2022-06-19 17:02:16 +00:00
$maxphp = @ini_get('upload_max_filesize'); // In unknown
if (preg_match('/k$/i', $maxphp)) {
$maxphp = preg_replace('/k$/i', '', $maxphp);
Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp (#30557) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Update phan baseline (remove PhanTypeInvalidLeftOperandOfNumericOp) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Fix: Change argument '' to null as by getAvailableDiscounts signature * Qual: Cast '' to float for Phan notice * Fix: Convert $number with price2num before using this parameter * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Add cast to ensure fmod is presented with floats
2024-08-15 14:57:02 +00:00
$maxphp = (int) ((float) $maxphp * 1);
2022-06-19 17:02:16 +00:00
}
if (preg_match('/m$/i', $maxphp)) {
$maxphp = preg_replace('/m$/i', '', $maxphp);
Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp (#30557) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Update phan baseline (remove PhanTypeInvalidLeftOperandOfNumericOp) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Fix: Change argument '' to null as by getAvailableDiscounts signature * Qual: Cast '' to float for Phan notice * Fix: Convert $number with price2num before using this parameter * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Add cast to ensure fmod is presented with floats
2024-08-15 14:57:02 +00:00
$maxphp = (int) ((float) $maxphp * 1024);
2022-06-19 17:02:16 +00:00
}
if (preg_match('/g$/i', $maxphp)) {
$maxphp = preg_replace('/g$/i', '', $maxphp);
Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp (#30557) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Update phan baseline (remove PhanTypeInvalidLeftOperandOfNumericOp) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Fix: Change argument '' to null as by getAvailableDiscounts signature * Qual: Cast '' to float for Phan notice * Fix: Convert $number with price2num before using this parameter * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Add cast to ensure fmod is presented with floats
2024-08-15 14:57:02 +00:00
$maxphp = (int) ((float) $maxphp * 1024 * 1024);
2022-06-19 17:02:16 +00:00
}
if (preg_match('/t$/i', $maxphp)) {
$maxphp = preg_replace('/t$/i', '', $maxphp);
Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp (#30557) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Update phan baseline (remove PhanTypeInvalidLeftOperandOfNumericOp) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Fix: Change argument '' to null as by getAvailableDiscounts signature * Qual: Cast '' to float for Phan notice * Fix: Convert $number with price2num before using this parameter * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Add cast to ensure fmod is presented with floats
2024-08-15 14:57:02 +00:00
$maxphp = (int) ((float) $maxphp * 1024 * 1024 * 1024);
2022-06-19 17:02:16 +00:00
}
$maxphp2 = @ini_get('post_max_size'); // In unknown
if (preg_match('/k$/i', $maxphp2)) {
$maxphp2 = preg_replace('/k$/i', '', $maxphp2);
Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp (#30557) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Update phan baseline (remove PhanTypeInvalidLeftOperandOfNumericOp) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Fix: Change argument '' to null as by getAvailableDiscounts signature * Qual: Cast '' to float for Phan notice * Fix: Convert $number with price2num before using this parameter * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Add cast to ensure fmod is presented with floats
2024-08-15 14:57:02 +00:00
$maxphp2 = (int) ((float) $maxphp2) * 1;
2022-06-19 17:02:16 +00:00
}
if (preg_match('/m$/i', $maxphp2)) {
$maxphp2 = preg_replace('/m$/i', '', $maxphp2);
Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp (#30557) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Update phan baseline (remove PhanTypeInvalidLeftOperandOfNumericOp) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Fix: Change argument '' to null as by getAvailableDiscounts signature * Qual: Cast '' to float for Phan notice * Fix: Convert $number with price2num before using this parameter * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Add cast to ensure fmod is presented with floats
2024-08-15 14:57:02 +00:00
$maxphp2 = (int) ((float) $maxphp2 * 1024);
2022-06-19 17:02:16 +00:00
}
if (preg_match('/g$/i', $maxphp2)) {
$maxphp2 = preg_replace('/g$/i', '', $maxphp2);
Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp (#30557) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Update phan baseline (remove PhanTypeInvalidLeftOperandOfNumericOp) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Fix: Change argument '' to null as by getAvailableDiscounts signature * Qual: Cast '' to float for Phan notice * Fix: Convert $number with price2num before using this parameter * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Add cast to ensure fmod is presented with floats
2024-08-15 14:57:02 +00:00
$maxphp2 = (int) ((float) $maxphp2 * 1024 * 1024);
2022-06-19 17:02:16 +00:00
}
if (preg_match('/t$/i', $maxphp2)) {
$maxphp2 = preg_replace('/t$/i', '', $maxphp2);
Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp (#30557) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Update phan baseline (remove PhanTypeInvalidLeftOperandOfNumericOp) * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Fix: Change argument '' to null as by getAvailableDiscounts signature * Qual: Cast '' to float for Phan notice * Fix: Convert $number with price2num before using this parameter * Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp # Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp These changes ensure that the left operand is a numeric value * Add cast to ensure fmod is presented with floats
2024-08-15 14:57:02 +00:00
$maxphp2 = (int) ((float) $maxphp2 * 1024 * 1024 * 1024);
2022-06-19 17:02:16 +00:00
}
// Now $max and $maxphp and $maxphp2 are in Kb
$maxmin = $max;
$maxphptoshow = $maxphptoshowparam = '';
if ($maxphp > 0) {
$maxmin = min($maxmin, $maxphp);
$maxphptoshow = $maxphp;
$maxphptoshowparam = 'upload_max_filesize';
}
if ($maxphp2 > 0) {
$maxmin = min($maxmin, $maxphp2);
if ($maxphp2 < $maxphp) {
$maxphptoshow = $maxphp2;
$maxphptoshowparam = 'post_max_size';
}
}
//var_dump($maxphp.'-'.$maxphp2);
//var_dump($maxmin);
return array('max' => $max, 'maxmin' => $maxmin, 'maxphptoshow' => $maxphptoshow, 'maxphptoshowparam' => $maxphptoshowparam);
2022-06-19 17:02:16 +00:00
}
/**
* Check if IP address is in CIDR range
*
* @param string $ip IP address to check (ex: 192.168.0.50, 2001:db8:3333:4444::5555:6666)
* @param string $cidr Network IP CIDR notation (ex: 192.168.0.0/24, 2001:db8:3333:4444::/64)
2026-01-15 02:18:50 +00:00
* @return int 1 if IP is in CIDR range, 0 if IP out of CIDR range, -1 if check error
*/
2026-01-15 02:18:50 +00:00
function checkIPInCidr($ip, $cidr)
{
list($network, $prefix) = explode('/', $cidr, 2);
// Convert IPs to binary format
$ip_bin = @inet_pton($ip);
$net_bin = @inet_pton($network);
if ($ip_bin === false || $net_bin === false) {
return -1;
}
// Require same address IPvX family
if (strlen($ip_bin) !== strlen($net_bin)) {
return -1;
}
// Comparison boundaries
$total_bits = strlen($ip_bin) * 8;
$prefix = max(0, min((int) $prefix, $total_bits));
$full_bytes = intdiv($prefix, 8);
$rem_bits = $prefix % 8;
// Compare full bytes and partial bytes
if ($full_bytes > 0) {
if (substr($ip_bin, 0, $full_bytes) !== substr($net_bin, 0, $full_bytes)) {
return 0;
}
}
if ($rem_bits > 0) {
$mask = (0xFF << (8 - $rem_bits)) & 0xFF;
$ip_byte = ord($ip_bin[$full_bytes]);
$net_byte = ord($net_bin[$full_bytes]);
if (($ip_byte & $mask) !== ($net_byte & $mask)) {
return 0;
}
}
return 1;
}