Skip to content

Commit dbbef10

Browse files
committed
Travis Attempt CodeLouisville#21
Switch "" and [].
1 parent ea38d6e commit dbbef10

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/data_types.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function convert_to_array($arr){
7171

7272
//convert_to_null#2
7373
function convert_to_null ($null){
74-
if ($null == "null") {
74+
if ($null == "null"|| $null == "" || $null == []) {
7575
return null;
7676
} else {
7777
if ($null || $null == null) {
@@ -84,4 +84,5 @@ function convert_to_null ($null){
8484
}
8585

8686
}
87-
echo convert_to_null(null);
87+
$test = convert_to_null('');
88+
var_dump($test);

0 commit comments

Comments
 (0)