Commit graph

20 commits

Author SHA1 Message Date
Frédéric FRANCE
840538d702
FIX: Resolve possibly-undefined-variable cases flagged by PHPStan (#39523)
* FIX: Resolve possibly-undefined-variable cases flagged by PHPStan

Fixes several cases of the variable.undefined PHPStan rule instead of
just excluding them via the baseline: a wrong variable used to build a
delete link (dir_add_card.php), an uninitialized $result across a
try/catch (CMailFile), missing GETPOST reads ($mode, $fk_project/$date
reset via unset() creating cross-branch ambiguity), a missing $r
contract check (commonfieldsinimport.inc.php), missing @var/global
annotations for $conf/$langs/$bc, dead extrafields-display code
guarded by the wrong condition (expedition/card.php), and an
undefined $soc passed to formAddObjectLine() where objects have no
buyer thirdparty (replaced with null). Corresponding entries removed
from dev/build/phpstan/phpstan-baseline.neon.

* FIX: Resolve more possibly-undefined-variable cases flagged by PHPStan

Second batch of variable.undefined fixes removed from the baseline:
- Complex conditional flows PHPStan can't prove exhaustive (Stripe key
  selection in commoninvoice.class.php, a situation-invoice loop var in
  pdf_sponge.modules.php, a product loop var in stock/movement_list.php)
  fixed by adding a definite initialization before the ambiguous branch.
- A commented-out $linkback assignment restored in
  expensereport/payment/info.php.
- Missing GETPOST reads added (holiday/list.php update-date filters,
  product/stock/info.php $action/$socid, projet/comment.php $mode).
- A dead-code $mesg call to dol_htmloutput_mesg() removed from
  admin_hrm.php (messages are already shown via setEventMessages()).
- Redundant isset() checks removed in product/reassort.php and
  reassortlot.php where $type is unconditionally set earlier in the
  same file, so the isset()-false branch was unreachable dead code.
- $user documented as always available in public/bookcal/index.php
  (NOREQUIREUSER is not defined on that page).
- A genuinely missing $tmpcode initialization fixed in
  attendee_new.php, suggestbooth.php and suggestconference.php: when
  an existing thirdparty is reused (or SOCIETE_CODECLIENT_ADDON has no
  auto-numbering), $tmpcode was never set before being assigned to
  code_client/code_fournisseur.

* add phan fix

* add phan fix

* fix

* fix

* fix
2026-08-15 18:33:12 +02:00
Laurent Destailleur
759ddd2d73 Clean code 2023-05-01 16:21:00 +02:00
Philippe GRAND
2a16db0e86 fix : Warning: Undefined variable in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/core/filemanagerdol/browser/default/browser.php on line 52 2023-02-24 11:35:07 +01:00
Laurent Destailleur
dce27fa165 Clean code 2022-08-10 19:12:19 +02:00
Laurent Destailleur
6858b47542 FIX #yogosha12006 2022-08-10 18:47:33 +02:00
Laurent Destailleur
88e6c67c10 Look and feel v16 of media manager 2022-04-01 14:29:11 +02:00
Frédéric FRANCE
ae3228b9e0
retrieve the spelling 🎉 2020-10-23 20:08:35 +02:00
Laurent Destailleur
8d77bfacd2 Fix #yogosha4490 2020-09-18 03:07:13 +02:00
Scrutinizer Auto-Fixer
444c293c01 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2020-04-10 08:59:32 +00:00
Alexandre SPANGARO
02dbc11f98 Move Gnu.org to https 2019-09-23 21:55:30 +02:00
Laurent Destailleur
0af555126c Fix PHPCS 2016-07-06 11:23:32 +02:00
Laurent Destailleur
f59f3032c6 NEW: Rename path for generic medias files into '/medias' instead of
fckeditor. Add location of medias into title of media browser of
ckeditor.
Work on website module
2016-05-01 16:34:50 +02:00
Laurent Destailleur
c41a955cbe Fix: Permissions on files 2013-08-06 00:36:04 +02:00
Laurent Destailleur
8d206fdfb0 Prepare move to other licence. For the moment all answers for licence
upgrade were not yet received. So we prepare for GPL by uniformizing
licence text keys to GPL-3+. Will move later to AGPL if all answers are
positive.
2013-01-16 15:36:08 +01:00
Marcos García
f3674317ec Removed parenthesis from all require and replaced with single quotes 2012-08-22 23:24:21 +02:00
Regis Houssin
ddf0f3521f Fix: [Bug #403] Insertion Image via l'éditeur WISIWIG plante 2012-05-11 10:14:15 +02:00
Laurent Destailleur
3383d314c9 Doxygen 2012-03-19 17:18:11 +01:00
Regis Houssin
551e1f81bf Fix: Space after closing parenthesis of function call prohibited 2011-09-20 13:32:16 +00:00
Laurent Destailleur
147822c82e Look: File manager is simpler 2011-08-16 17:59:46 +00:00
Laurent Destailleur
ef2aff034f Qual: Removed fckeditor lib 2011-08-14 23:54:09 +00:00
Renamed from htdocs/includes/fckeditor/editor/filemanager/browser/default/browser.html (Browse further)