Qual: Fix phan notices (website)

This commit is contained in:
MDW
2025-02-26 23:14:28 +01:00
parent 4d093451ab
commit 32bf8c5cd5
19 changed files with 82 additions and 77 deletions

View File

@@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2009-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
@@ -143,10 +143,10 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir =
$texttoinsert .= " 'notnull' => ".(empty($val['notnull']) ? 0 : (int) $val['notnull']).",";
$texttoinsert .= ' "visible" => "'.($val['visible'] !== '' ? dol_escape_js($val['visible']) : -1).'",';
if (!empty($val['noteditable'])) {
$texttoinsert .= ' "noteditable" => "'.dol_escape_php($val['noteditable']).'",';
$texttoinsert .= ' "noteditable" => "'.dol_escape_php((string) $val['noteditable']).'",';
}
if (!empty($val['alwayseditable'])) {
$texttoinsert .= ' "alwayseditable" => "'.dol_escape_php($val['alwayseditable']).'",';
$texttoinsert .= ' "alwayseditable" => "'.dol_escape_php((string) $val['alwayseditable']).'",';
}
if (array_key_exists('default', $val) && (!empty($val['default']) || $val['default'] === '0')) {
$texttoinsert .= ' "default" => "'.dol_escape_php($val['default']).'",';
@@ -555,7 +555,7 @@ function deletePerms($file)
* @param int|string $a value 1
* @param int|string $b value 2
* @return int<-1,1> <=0 if str1 is less than str2; > 0 if str1 is greater than str2, and 0 if they are equal.
*/
*/
function compareFirstValue($a, $b)
{
return strcmp($a[0], $b[0]);