Can anyone, please, suggest what is the purpose of a 'break' statement within an 'if' block in a function views_ui_config_item_extra_form:2445 ?
PHP manual says 'break' is only allowed within for, foreach, while, do-while or switch structure
, but here we have it only inside an 'if' inside a function.
(I've bumped into this mainly because I'm trying to use a non-standard PHP compiler which gives a compile-time error here, telling something: Cannot break/continue 1 level(s)
. I was already given an explanation in the similar case, which appeared to be a bug in core Drupal code: #763948: In the file install.pgsql.inc there is an undocumented usage of PHP function pg_result_error without an argument.. So I hope to learn something new this time too.)
Thanks in advance.
Comments
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedLooks to me like it's a leftover from code changes and/or cut & paste.
Comment #2
esteewhy CreditAttribution: esteewhy commentedThank You, Earl.
Indeed, there seems to be some meaning in an 'orphaned' break, according to a commenters out here. At least my brief experiment shows that 'break' terminates the script entirely:
Comment #3
esteewhy CreditAttribution: esteewhy commentedUps, there seems to be more to this: 2 more places where such 'break' exists. So I've updated the patch accordingly.
Comment #4
dawehnerUPdate status
Comment #5
dawehnerCan we modify the indentation to keep the good codestyle?
The rest looks fine
Comment #6
esteewhy CreditAttribution: esteewhy commentedComment #7
esteewhy CreditAttribution: esteewhy commentedDaniel, could You please also suggest: do I need to take any action on the similar issue #763948: In the file install.pgsql.inc there is an undocumented usage of PHP function pg_result_error without an argument. ?
Comment #8
dawehnerThanks for rerolling the patch. Here is the patch for 6.x-3.x.
The patch from #6 looks fine but i cannot RTBC the patch anymore because i uploaded already a patch :) Thanks for your work.
Comment #9
dawehnerBut the patch from #6 looks fine.
For #763948: In the file install.pgsql.inc there is an undocumented usage of PHP function pg_result_error without an argument. i think the central problem is that there are not many people looking at patches against 6.x. Core dev's are concentrating on bringing d7 out. Additional another problem might be that you use pg. There are really not many people which uses it on d6 and i'm not sure whether it's a good think to do. You step into many different kind of problems.
Comment #10
merlinofchaos CreditAttribution: merlinofchaos commentedCommitted to all branches.