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

ericmulder1980’s picture

Status: Active » Closed (won't fix)

Hi 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