Skip to content
Snippets Groups Projects
Commit 9511df85 authored by Ide Braakman's avatar Ide Braakman Committed by Devin Zuczek
Browse files

Issue #2403181 by idebr: Strict warning: Only variables should be passed by...

Issue #2403181 by idebr: Strict warning: Only variables should be passed by reference in quiz_question_node_presave()
parent 6ca540ac
No related branches found
No related tags found
No related merge requests found
......@@ -429,7 +429,8 @@ function quiz_question_node_presave($node) {
foreach ($q_types as $q_type => $info) {
if ($node->type == $q_type) {
if (drupal_strlen($node->title) == 0 || !user_access('edit question titles')) {
$markup = strip_tags(drupal_render(field_view_field('node', $node, 'body', array('label' => 'hidden'))));
$body = field_view_field('node', $node, 'body', array('label' => 'hidden'));
$markup = strip_tags(drupal_render($body));
if (drupal_strlen($markup) > variable_get('quiz_autotitle_length', 50)) {
$node->title = drupal_substr($markup, 0, variable_get('quiz_autotitle_length', 50) - 3) . '...';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment