I am getting this error when viewing my view:
Notice: Undefined variable: row - __lambda_func() (eilutė 1 iš D:\Server\domains\auklytes.dev\sites\all\modules\views_php\plugins\views\views_php_handler_sort.inc(73) : runtime-created function).
Notice: Trying to get property of non-object - __lambda_func() (eilutė 1 iš D:\Server\domains\auklytes.dev\sites\all\modules\views_php\plugins\views\views_php_handler_sort.inc(73) : runtime-created function).
My sort code:
$uid = $row->uid;
$commentRating = db_query("SELECT AVG(s.field_fivestars_rating) FROM {field_data_field_fivestars} s INNER JOIN {field_data_field_atsiliepimas} a ON a.entity_type = s.entity_type AND a.bundle=s.bundle AND a.deleted = 0 AND a.entity_id = s.entity_id WHERE a.field_atsiliepimas_target_id = '$uid' AND a.entity_type = 'node' AND a.deleted = 0 AND a.bundle = 'atsiliepimai' AND s.entity_type = 'node' AND s.bundle = 'atsiliepimai' AND s.deleted = 0")->fetchColumn();
if ($commentRating==NULL) {
$commentRating=0;
}
return $commentRating;
Comments
Comment #1
mgiffordPossible duplicate of #1413780: Undefined index: 0 in __lambda_func() (line 5 of /var/www/html/java/drupal_fb/sites/all/modules/views_php/plugins/views/views_php_handler_field.inc(202) : runtime-created function)
Comment #1.0
mgiffordone more error