@@ -301,7 +301,7 @@ function ($expr) {
301
301
$ parts = \explode (".%. " , (string ) $ col );
302
302
303
303
if ($ expr ->tableName () !== null ) {
304
- list ( $ col_table_name , $ col_name) = $ parts ;
304
+ [ $ col_table_name , $ col_name] = $ parts ;
305
305
if ($ col_table_name == $ expr ->tableName ()) {
306
306
if (!\array_key_exists ($ col , $ formatted_row )) {
307
307
$ formatted_row [$ col_name ] = $ val ;
@@ -320,11 +320,15 @@ function ($expr) {
320
320
continue ;
321
321
}
322
322
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
+ */
323
328
$ val = Expression \Evaluator::evaluate ($ conn , $ scope , $ expr , $ row , $ group_result );
324
329
$ name = $ expr ->name ;
325
330
326
- if ($ expr instanceof SubqueryExpression) {
327
- assert (\is_array ($ val ), 'subquery results must be KeyedContainer ' );
331
+ if ($ expr instanceof SubqueryExpression && \is_array ($ val )) {
328
332
if (\count ($ val ) > 1 ) {
329
333
throw new ProcessorException ("Subquery returned more than one row " );
330
334
}
@@ -477,7 +481,7 @@ private static function getSelectSchema(
477
481
$ parts = \explode (". " , $ column_id );
478
482
479
483
if ($ expr_table_name = $ expr ->tableName ()) {
480
- list ( $ column_table_name) = $ parts ;
484
+ [ $ column_table_name] = $ parts ;
481
485
482
486
if ($ column_table_name === $ expr_table_name ) {
483
487
$ columns [$ column_id ] = $ from_column ;
0 commit comments