File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -100,8 +100,13 @@ class HTML5_TreeBuilder {
100
100
private function strConst ($ number ) {
101
101
static $ lookup ;
102
102
if (!$ lookup ) {
103
+ $ lookup = array ();
103
104
$ r = new ReflectionClass ('HTML5_TreeBuilder ' );
104
- $ lookup = array_flip ($ r ->getConstants ());
105
+ $ consts = $ r ->getConstants ();
106
+ foreach ($ consts as $ const => $ num ) {
107
+ if (!is_int ($ num )) continue ;
108
+ $ lookup [$ num ] = $ const ;
109
+ }
105
110
}
106
111
return $ lookup [$ number ];
107
112
}
@@ -154,6 +159,7 @@ public function emitToken($token, $mode = null) {
154
159
$this->printStack();
155
160
$this->printActiveFormattingElements();
156
161
if ($this->foster_parent) echo " -> this is a foster parent mode\n";
162
+ if ($this->flag_frameset_ok) echo " -> frameset ok\n";
157
163
*/
158
164
159
165
if ($ this ->ignore_lf_token ) $ this ->ignore_lf_token --;
You can’t perform that action at this time.
0 commit comments