Closed kuzmamar closed 8 years ago
I think your NULL_Value
definition could completely replace the current 'NULL'
(quoted) one - it's not working and you'll never get the current NullMapper:
$mappers = [
'NULL' => 'NullMapper',
'application/json' => 'JsonMapper',
];
$contentType = explode(';', NULL); // content-type header not set in the request
$contentType = Strings::trim($contentType[0]);
isset($mappers[$contentType]) === FALSE // always FALSE in the current version
but your definition works:
$mappers = [
NULL => 'NullMapper',
'application/json' => 'JsonMapper',
];
$contentType = explode(';', NULL); // content-type header not set in the request
$contentType = Strings::trim($contentType[0]);
isset($mappers[$contentType]) === TRUE // NULL is converted to the empty string and it fits to NULL key.
@Stene3 You are probably right. I added the new constant, because i did not want to brake anything. :D But now i replaced. Let's @drahak to deside.
This should fix problem #93