@@ -301,7 +301,7 @@ function ($expr) {
301301 $ parts = \explode (".%. " , (string ) $ col );
302302
303303 if ($ expr ->tableName () !== null ) {
304- list ( $ col_table_name , $ col_name) = $ parts ;
304+ [ $ col_table_name , $ col_name] = $ parts ;
305305 if ($ col_table_name == $ expr ->tableName ()) {
306306 if (!\array_key_exists ($ col , $ formatted_row )) {
307307 $ formatted_row [$ col_name ] = $ val ;
@@ -320,11 +320,15 @@ function ($expr) {
320320 continue ;
321321 }
322322
323+ /**
324+ * Evaluator case \Vimeo\MysqlEngine\Query\Expression\SubqueryExpression::class:
325+ * should ensure the value of $val is never an array, and only the value of the
326+ * column requested, but we'll leave this code just to make sure of that.
327+ */
323328 $ val = Expression \Evaluator::evaluate ($ conn , $ scope , $ expr , $ row , $ group_result );
324329 $ name = $ expr ->name ;
325330
326- if ($ expr instanceof SubqueryExpression) {
327- assert (\is_array ($ val ), 'subquery results must be KeyedContainer ' );
331+ if ($ expr instanceof SubqueryExpression && \is_array ($ val )) {
328332 if (\count ($ val ) > 1 ) {
329333 throw new ProcessorException ("Subquery returned more than one row " );
330334 }
@@ -477,7 +481,7 @@ private static function getSelectSchema(
477481 $ parts = \explode (". " , $ column_id );
478482
479483 if ($ expr_table_name = $ expr ->tableName ()) {
480- list ( $ column_table_name) = $ parts ;
484+ [ $ column_table_name] = $ parts ;
481485
482486 if ($ column_table_name === $ expr_table_name ) {
483487 $ columns [$ column_id ] = $ from_column ;
0 commit comments