lsuonline / lsuce-block_quickmail

5 stars 32 forks source link

PHPCompatibility.Variables.NewUniformVariableSyntax.Found since PHP7.0 #53

Open sharpchi opened 1 year ago

sharpchi commented 1 year ago

Running the Moodle codechecker against your code I found the following error in blocks/quickmail/tests/unit/traits/submits_compose_message_form.php

#88: ····························$$containername[]·=·$recipienttype·.·'_'·.·$id;
Indirect access to variables, properties and methods will be evaluated strictly in left-to-right order since PHP 7.0. Use curly braces to remove ambiguity. (PHPCompatibility.Variables.NewUniformVariableSyntax.Found)

I believe the change required is:

${$containername}[] = $recipienttype . '_' . $id;