File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -131,10 +131,10 @@ public function parse($code)
131131 {
132132 $ code = $ this ->getCodeWithMacros ($ code );
133133 $ code = $ this ->getCodeWithCompilers ($ code );
134- $ code = base64_encode ($ code );
134+ $ code = base64_encode (gzencode ( $ code) );
135135
136136 return defer ("
137- \$code = base64_decode(' {$ code }');
137+ \$code = gzdecode( base64_decode(' {$ code }') );
138138 \$engine = new \Yay\Engine;
139139
140140 gc_disable();
@@ -151,7 +151,7 @@ private function getCodeWithCompilers($code)
151151 $ this ->getCompilers (),
152152 $ this ->getDiscoveredCompilers ()
153153 );
154-
154+
155155 foreach ($ compilers as $ compiler ) {
156156 if (is_callable ($ compiler )) {
157157 $ code = $ compiler ($ code );
@@ -167,7 +167,7 @@ private function getCodeWithMacros($code)
167167 $ this ->getMacros (),
168168 $ this ->getDiscoveredMacros ()
169169 );
170-
170+
171171 foreach ($ macros as $ macro ) {
172172 if (file_exists ($ macro )) {
173173 $ code = str_replace (
Original file line number Diff line number Diff line change @@ -48,14 +48,14 @@ function defer($code) {
4848 {$ code };
4949 };
5050
51- print base64_encode(serialize ( \$function()));
51+ print base64_encode(gzencode ( \$function()));
5252 " ;
5353
5454 $ result = exec (
5555 "php -r 'eval(base64_decode( \"" . base64_encode ($ defer ) . "\"));' "
5656 );
5757
58- return unserialize (base64_decode ($ result ));
58+ return gzdecode (base64_decode ($ result ));
5959 }
6060}
6161
You can’t perform that action at this time.
0 commit comments