File tree 1 file changed +12
-4
lines changed
1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -272,10 +272,15 @@ function cleanArray($didYouMeans){
272
272
273
273
if (isset ($ _GET ['bundle ' ])){
274
274
// $code = file_get_contents($file);
275
+ $ rawFileContents = $ code ;
275
276
$ FileAll = (new \Nette \PhpGenerator \Extractor (file_get_contents ($ file )))->extractAll ();
276
277
$ code = (new \Nette \PhpGenerator \PsrPrinter )->printFile ($ FileAll );
277
-
278
-
278
+ if ( empty (trim ($ code , ' <?php ' ))
279
+ || preg_match ("/(echo|\=)([\s \t\n\r]*)\<\<\<[\s \t\n\r]*/ " , $ rawFileContents )){
280
+ $ code = $ rawFileContents ;
281
+ }
282
+
283
+
279
284
$ code = false === strpos ($ code , base64_decode ('X19oYWx0X2NvbXBpbGVyKCk7 ' ))
280
285
? $ loader ->sign ($ code , [ file_get_contents ($ priv_key_file ), $ password ], 'X19oYWx0X2NvbXBpbGVyKCk7 ' )
281
286
: $ code ;
@@ -363,8 +368,11 @@ function cleanArray($didYouMeans){
363
368
$ outPut = (new \Nette \PhpGenerator \PsrPrinter )->printFile ($ File );
364
369
}
365
370
366
- if (0 ===count ($ Nss ) || empty (trim ($ outPut , ' <?php ' ))){
367
- $ outPut = file_get_contents ($ file );
371
+ $ rawFileContents = file_get_contents ($ file );
372
+
373
+ if (0 ===count ($ Nss ) || empty (trim ($ outPut , ' <?php ' ))
374
+ || preg_match ("/(echo|\=)([\s \t\n\r]*)\<\<\<[\s \t\n\r]*/ " , $ rawFileContents )){
375
+ $ outPut = $ rawFileContents ;
368
376
}
369
377
370
378
You can’t perform that action at this time.
0 commit comments