File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
tests/TestCase/Database/Type Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -130,12 +130,9 @@ public function marshal($value)
130
130
if ($ value === null || $ value === '' ) {
131
131
return null ;
132
132
}
133
- if (is_numeric ($ value ) || ctype_digit ( $ value ) ) {
133
+ if (is_numeric ($ value )) {
134
134
return (int )$ value ;
135
135
}
136
- if (is_array ($ value )) {
137
- return 1 ;
138
- }
139
136
140
137
return null ;
141
138
}
Original file line number Diff line number Diff line change @@ -159,7 +159,10 @@ public function testMarshal()
159
159
$ this ->assertNull ($ result );
160
160
161
161
$ result = $ this ->type ->marshal (['3 ' , '4 ' ]);
162
- $ this ->assertSame (1 , $ result );
162
+ $ this ->assertNull ($ result );
163
+
164
+ $ result = $ this ->type ->marshal ('+0123.45e2 ' );
165
+ $ this ->assertSame (12345 , $ result );
163
166
}
164
167
165
168
/**
You can’t perform that action at this time.
0 commit comments