Closed (fixed)
Project:
Cufón
Version:
7.x-2.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Sep 2011 at 07:41 UTC
Updated:
16 Sep 2011 at 13:01 UTC
Jump to comment: Most recent file
Sometimes disabled (=not enabled) selectors continue 'triggering'.
1) Create and enable two selectors with same font, for example: "h1" "Font1" and ".title" "Font1".
2) Disable one of them.
3) Both are working.
Patch.
PHP 5.3.3 here.
p.s. This is one of the reaon why I personally prefer not to use PHP constructs like foreach($array as &$elem).
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | cufon_1266340.patch | 615 bytes | troky |
| #1 | disabled_still_working.patch | 1.13 KB | OnkelTem |
| disabled_still_working.patch | 616 bytes | OnkelTem |
Comments
Comment #1
OnkelTem commentedPrevious patch has bugs: it disables selectors which are defined _before_ enabled selectors :)
New version - separate loop for cleaning up.
Comment #2
troky commentedYeah, bug confirmed :)
Can you test attached patch? It is slightly simpler than yours.
Comment #3
OnkelTem commented@troky
Yeah, now compare it to the patch in the first comment? ;-)
Look carefully - it may not iterate to the end of $selectors array, since there is a `break` which triggers when a font is found.
For example, in this case, both selectors will survive:
enabled "selector 1" Font A
disabled "selector 2" Font A
:)
Comment #4
troky commentedLOL, didn't even checked that first patch. :)
Patch from #1 committed. Thanks.