[php-src] Issue #12682: Incorrect error message when passing null to join/implode's array parameter

From: Date: Wed, 15 Nov 2023 22:37:02 +0000
Subject: [php-src] Issue #12682: Incorrect error message when passing null to join/implode's array parameter
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-245810@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/12682 Author: CViniciusSDias ### Description The following code: ```php <?php try { join('', null); } catch (TypeError $e) { echo $e->getMessage(); } ?> ``` Resulted in this output: ``` join(): Argument #1 ($pieces) must be of type array, string given ``` But I expected this output instead: ``` join(): Argument #2 ($array) must be of type array, null given ``` ### PHP Version PHP 8.2.10 ### Operating System _No response_

« previous php.bugs (#245810) next »