- Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
Describe the bug
Passing a multidimensional array to the Attribute instance, will cause an mb_strlen exception.
To Reproduce
// Simply create a new Attribute instance and pass it multidimensional array data: new \FINDOLOGIC\Export\Data\Attribute( 'attribute_with_very_long_value', [ 'ayy' => [ 'interesting' => 'nice' ] ] );Expected behavior
A clear exception indicating I have passed wrong data there, which isn't valid.
Actual behavior
An mb_strlen exception happens, which isn't really clear about what happened:
mb_strlen() expects parameter 1 to be string, array given /home/dom/github/findologic/libflexport/src/FINDOLOGIC/Export/Helpers/DataHelper.php:101 /home/dom/github/findologic/libflexport/src/FINDOLOGIC/Export/Data/Attribute.php:37 /home/dom/github/findologic/libflexport/src/FINDOLOGIC/Export/Data/Attribute.php:46 /home/dom/github/findologic/libflexport/src/FINDOLOGIC/Export/Data/Attribute.php:28 Screenshots
Reactions are currently unavailable
