Description
When I try to inject array as a QueryType parameter I get:
Warning: substr() expects parameter 1 to be string, array given
Stacktrace:
[1] Symfony\Component\Debug\Exception\ContextErrorException: Warning: substr() expects parameter 1 to be string, array given at n/a in /Users/clash82/Documents/workspace/ezplatform.lh/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/QueryType/QueryParameterContentViewQueryTypeMapper.php line 70 at Symfony\Component\Debug\ErrorHandler->handleError('2', 'substr() expects parameter 1 to be string, array given', '/Users/clash82/Documents/workspace/ezplatform.lh/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/QueryType/QueryParameterContentViewQueryTypeMapper.php', '70', array('contentView' => object(ContentView), 'queryParameterValue' => array('layout', 'article'))) in line at substr(array('layout', 'article'), '0', '2') in /Users/clash82/Documents/workspace/ezplatform.lh/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/QueryType/QueryParameterContentViewQueryTypeMapper.php line 70 at eZ\Publish\Core\QueryType\QueryParameterContentViewQueryTypeMapper->evaluateExpression(object(ContentView), array('layout', 'article')) in /Users/clash82/Documents/workspace/ezplatform.lh/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/QueryType/QueryParameterContentViewQueryTypeMapper.php line 55 at eZ\Publish\Core\QueryType\QueryParameterContentViewQueryTypeMapper->extractParameters(object(ContentView)) in /Users/clash82/Documents/workspace/ezplatform.lh/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/QueryType/QueryParameterContentViewQueryTypeMapper.php line 40 at eZ\Publish\Core\QueryType\QueryParameterContentViewQueryTypeMapper->map(object(ContentView)) in /Users/clash82/Documents/workspace/ezplatform.lh/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/MVC/Symfony/Controller/Content/QueryController.php line 80 at eZ\Publish\Core\MVC\Symfony\Controller\Content\QueryController->runQuery(object(ContentView), 'findLocations') in /Users/clash82/Documents/workspace/ezplatform.lh/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/MVC/Symfony/Controller/Content/QueryController.php line 53 at eZ\Publish\Core\MVC\Symfony\Controller\Content\QueryController->locationQueryAction(object(ContentView)) in line at call_user_func_array(array(object(QueryController), 'LocationQueryAction'), array(object(ContentView))) in /Users/clash82/Documents/workspace/ezplatform.lh/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php line 144 at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), '1') in /Users/clash82/Documents/workspace/ezplatform.lh/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php line 64 at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), '1', true) in /Users/clash82/Documents/workspace/ezplatform.lh/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php line 69 at Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle(object(Request), '1', true) in /Users/clash82/Documents/workspace/ezplatform.lh/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php line 185 at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) in /Users/clash82/Documents/workspace/ezplatform.lh/web/app.php line 67
Working example can be found in here: https://github.com/ezsystems/ezplatform-com/pull/58