drlippman / IMathAS

IMathAS Online Math Assessment
Other
110 stars 98 forks source link

undefined array key error with byelement and partweights #415

Closed nick-chura closed 6 months ago

nick-chura commented 6 months ago

I noticed the following error when using "byelement" and "partweights" in an n-tuple problem:

Caught warning in the question code: Undefined array key 1 on line 285 in file /var/app/current/assess2/questions/scorepart/NTupleScorePart.php

sonarcloud[bot] commented 6 months ago

Quality Gate Failed Quality Gate failed

Failed conditions

C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

idea Catch issues before they fail your Quality Gate with our IDE extension SonarLint SonarLint

drlippman commented 6 months ago

Thanks, but the changes you made don't seem to fix the issue. Line 285 really needs to change to if (!empty($matchedparts[$pwi])). I'll make that change.