Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
if ($radius == 0) {
return $img; imagedestroy($img);
break;
}
php7 rightfully rejects this bit since the break is invalid in this context not to mention that code cannot be executed since it is after the return
Comment | File | Size | Author |
---|---|---|---|
#3 | invalid_syntax_logic-2639570-3.patch | 435 bytes | joelpittet |
Comments
Comment #2
boombatower CreditAttribution: boombatower commentedsimple solution was to drop this code, but present in 6.x as well
Comment #3
joelpittetRemoving unexecuted code.
Comment #4
drclaw CreditAttribution: drclaw commentedPatch looks good and applies cleanly. TBH I'm actually not 100% sure how to test it, but I'm pretty confident the removed code would never be run anyway since it's after the return statement so I'm happy to call this RTBC.
Does it matter that the function is pulled from http://vikjavev.no/computing/ump.php and that the extraneous code is in that source as well?
Comment #5
joelpittetNice find, I didn't noticed that but at least the copyright is left in there. There doesn't seem to be a license attached to that bit of code and the author suggests copying it.
Comment #6
mike503 CreditAttribution: mike503 commented+1 the fix is correct.
Comment #7
joelpittet@mike503, if the fix works in your testing please set the status to "Reviewed and Tested by the community"
Comment #8
mike503 CreditAttribution: mike503 commentedComment #9
nickonom CreditAttribution: nickonom commentedI also confirm the patch takes care of the issue. Ready to be committed.
Comment #10
AnybodyConfirming RTBC. Can we commit this please? Also a new stable release would make sense then perhaps?
Comment #11
jghyde CreditAttribution: jghyde commented#3 works and tested. Commit it!
Comment #12
joelpittetBump, ran into this in D6 as well, it's haunting me:)
Comment #13
SivaprasadC CreditAttribution: SivaprasadC as a volunteer and at DrupalPartners for Innoppl Technologies Pvt. Ltd commented#3 works like a charm. Confirming RTBC.
Comment #14
GiorgosK#3 works RTBC.
Comment #15
jwilson3RTBC++ #3 Applies cleanly against Drupal 6 imageapi.