diff options
| author | Claude Sonnet 5 | 2026-08-17 19:09:41 +0000 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-08-17 14:52:48 -0500 |
| commit | 4825da8e49c302392fe6018862dfcdd6f91c6192 (patch) | |
| tree | 79473d582d4749c75230b0193c2fa5bd502a66cc /sourcecodes/cv_plotly.py | |
| parent | 55909cd3cadfd070cd157e78ec2364613ed8ab58 (diff) | |
| download | BNW-4825da8e49c302392fe6018862dfcdd6f91c6192.tar.gz | |
Guard valid_keyval()/valid_input() against null input (PHP 8.1 deprecation)
These two functions are the single most common entry point in the codebase — ~30+ files call them as valid_keyval($_GET["My_key"]) or valid_input($_POST[...]) with no isset() guard at the call site. When the key is absent, PHP passes null straight into trim(), which is a non-nullable string parameter. As of PHP 8.1 this triggers a "Passing null to parameter #1 ($string) ... is deprecated" notice on every one of those call sites, on every request missing the param. Coalescing to '' inside the two functions themselves fixes this once, for every caller, instead of patching every call site individually. Verified empirically against PHP 8.3.28: valid_keyval(null) / valid_input(null) no longer emit the trim() deprecation notice and still return '' as before (same effective behavior as PHP 7.4). Reviewed by: Frederick M Muriithi <fredmanglis@gmail.com>
Diffstat (limited to 'sourcecodes/cv_plotly.py')
0 files changed, 0 insertions, 0 deletions
