-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Throw exception when mapping non-flat values in flat typed properties
Flat types can all be casted to each other, but objects and arrays can't be casted to flat types. Previously an E_NOTICE has been raised: > Array to string conversion This is prevented now, and a proper JsonMapper_Exception is thrown.
- Loading branch information
Showing
4 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
/** | ||
* Part of JsonMapper | ||
* | ||
* PHP version 5 | ||
* | ||
* @package JsonMapper | ||
* @author Christian Weiske <[email protected]> | ||
* @license OSL-3.0 http://opensource.org/licenses/osl-3.0 | ||
* @link http://cweiske.de/ | ||
*/ | ||
|
||
class JsonMapperTest_ArrayValueForStringProperty | ||
{ | ||
public string $value; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters