[web-php] PR #850: Fix: Do not pass `null` to function that expects `string`

From: Date: Tue, 05 Dec 2023 12:18:40 +0000
Subject: [web-php] PR #850: Fix: Do not pass `null` to function that expects `string`
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-31145@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/web-php/pull/850 Author: localheinz This pull request - [x] stops passing null to a function that expects string Follows #847. 💁‍♂️ Running ```shell php tests/run-tests.php -j3 -q ``` on current master with PHP 8.2 yields ```console PHP Deprecated: dirname(): Passing null to parameter #1 ($path) of type string is deprecated in /Users/am/Sites/php/web-php/tests/run-tests.php on line 267 Deprecated: dirname(): Passing null to parameter #1 ($path) of type string is deprecated in /Users/am/Sites/php/web-php/tests/run-tests.php on line 267 PHP Deprecated: dirname(): Passing null to parameter #1 ($path) of type string is deprecated in /Users/am/Sites/php/web-php/tests/run-tests.php on line 271 Deprecated: dirname(): Passing null to parameter #1 ($path) of type string is deprecated in /Users/am/Sites/php/web-php/tests/run-tests.php on line 271 ===================================================================== PHP : /opt/homebrew/Cellar/php@8.2/8.2.13/bin/php PHP_SAPI : cli PHP_VERSION : 8.2.13 ZEND_VERSION: 4.2.13 PHP_OS : Darwin - Darwin amMacPro.local 22.6.0 Darwin Kernel Version 22.6.0: Thu Nov 2 07:43:57 PDT 2023; root:xnu-8796.141.3.701.17~6/RELEASE_ARM64_T6000 arm64 INI actual : /opt/homebrew/etc/php/8.2/php.ini More .INIs : /opt/homebrew/etc/php/8.2/conf.d/ext-opcache.ini CWD : /Users/am/Sites/php/web-php Extra dirs : VALGRIND : Not used ===================================================================== TIME START 2023-12-05 12:04:45 ===================================================================== ===================================================================== ========= WELCOME TO THE FUTURE: run-tests PARALLEL EDITION ========= ===================================================================== Spawning 3 workers... Done in 0.03s ===================================================================== PASS sort no notes [tests/UserNotes/Sorter/sort-no-notes.phpt] PASS clean_AntiSPAM() removes spam terms [tests/clean-anti-spam.phpt] PASS gen_challenge() generates a spam challenge [tests/gen-challenge.phpt] PASS sort sample notes from strpos notes [tests/UserNotes/Sorter/sort-notes-full.phpt] PASS sort a single note with no votes [tests/UserNotes/Sorter/sort-single-note-with-no-votes.phpt] PASS sort some notes [tests/UserNotes/Sorter/sort-some-notes.phpt] PASS is_emailable_address() returns whether email is emailable [tests/is-emailable-address.phpt] PASS test_answer() returns true when answer to spam challenge is valid [tests/test-answer.phpt] ===================================================================== TIME END 2023-12-05 12:04:45 ===================================================================== TEST RESULT SUMMARY --------------------------------------------------------------------- Exts skipped : 0 Exts tested : 64 --------------------------------------------------------------------- Number of tests : 8 8 Tests skipped : 0 ( 0.0%) -------- Tests warned : 0 ( 0.0%) ( 0.0%) Tests failed : 0 ( 0.0%) ( 0.0%) Tests passed : 8 (100.0%) (100.0%) --------------------------------------------------------------------- Time taken : 0 seconds ===================================================================== ```

« previous php.webmaster (#31145) next »