Skip to content

Commit

Permalink
Fixed the error that non-string keys cannot be trimmed in nested arrays.
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammetsafak committed Jul 26, 2022
1 parent a98644a commit 0125ca2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Exception/ParameterBagInvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Muhammet ŞAFAK <[email protected]>
* @copyright Copyright © 2022 Muhammet ŞAFAK
* @license ./LICENSE MIT
* @version 1.1
* @version 1.1.1
* @link https://www.muhammetsafak.com.tr
*/

Expand Down
4 changes: 2 additions & 2 deletions src/ParameterBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Muhammet ŞAFAK <[email protected]>
* @copyright Copyright © 2022 InitPHP
* @license http://initphp.github.io/license.txt MIT
* @version 1.1
* @version 1.1.1
* @link https://www.muhammetsafak.com.tr
*/

Expand Down Expand Up @@ -228,7 +228,7 @@ private function arrayChangeKeyCaseLower(array $array): array
if(is_array($row)){
$row = $this->arrayChangeKeyCaseLower($row);
}
if($this->_PBOptions['isMulti'] !== FALSE){
if(is_string($row) && $this->_PBOptions['isMulti'] !== FALSE){
$row = trim($row, $this->_PBOptions['separator']);
}
return $row;
Expand Down
2 changes: 1 addition & 1 deletion src/ParameterBagInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @author Muhammet ŞAFAK <[email protected]>
* @copyright Copyright © 2022 Muhammet ŞAFAK
* @license ./LICENSE MIT
* @version 1.1
* @version 1.1.1
* @link https://www.muhammetsafak.com.tr
*/

Expand Down

0 comments on commit 0125ca2

Please sign in to comment.