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.
When browsing the colorbox files to better understand it, I've found the possible minor bug in file colorbox/js/colorbox_load.js at line 15.
while (e = r.exec(q[1])) {
Komodo Edit (multipurpose programming editor) shows warning:
strict warning: test for equality (==) mistyped as assignment (=)?: (on column 30)
Just wondering, if the usage of "=" instead "==" might be a bug. If not, please close the issue. If yes, please fix it :-)
Comments
Comment #1
ericmulder1980 CreditAttribution: ericmulder1980 commentedHi Barney,
Thanks for your "bug" report. To better understand what is happening in the piece of code you copied i suggest you take a look at the following pages:
While loop : http://www.w3schools.com/js/js_loop_while.asp
Exec function : http://www.w3schools.com/jsref/jsref_regexp_exec.asp
If you read through those you will find that "e = r.exec(q[1])" is not a test but an assignment. As long as r.exec(q[1]) returns a valid output (e) than the while loop will continue.
@maintainers sorry to close this issue for you but i assume you have other things to do than explain code.
Kind regards,
Eric