From 111ed0291703b5a12f36c0e6c649749c3c7bc7a6 Mon Sep 17 00:00:00 2001 From: Edmund Farrow <edmund.farrow@ed.ac.uk> Date: Thu, 23 May 2024 13:13:41 +0100 Subject: [PATCH] Update parsons.block.php Added some brackets in a string concatenation as unit tests were throwing a warning about changes for PHP8 --- stack/cas/castext2/blocks/parsons.block.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack/cas/castext2/blocks/parsons.block.php b/stack/cas/castext2/blocks/parsons.block.php index 0c17c8e45..6b29c5415 100644 --- a/stack/cas/castext2/blocks/parsons.block.php +++ b/stack/cas/castext2/blocks/parsons.block.php @@ -263,7 +263,7 @@ class stack_cas_castext2_parsons extends stack_cas_castext2_block { // If rows and index are passed then the length of index should match the value of rows + 1 if ($ogrows !== null) { - $code .= 'if (index !== undefined && index.length !== ' . $ogrows + 1 . ') + $code .= 'if (index !== undefined && index.length !== ' . ($ogrows + 1) . ') {stack_js.display_error("' . stack_string('stackBlock_incorrect_index_length') . '");}' . "\n"; } -- GitLab