This repository was archived by the owner on Apr 11, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ MJML PHP server
55
66Imagine you want render your [ MJML template] ( https://mjml.io ) on your private PHP server, now you can.
77
8+ > ** Please note:** This package is not officially supported as of 2021-04-01. Install MJML manually on the server, or use Docker.
9+
810How to install
911--------------
1012
Original file line number Diff line number Diff line change @@ -25,12 +25,12 @@ public function run(): void
2525 echo json_encode ([
2626 'status ' => 'ok ' ,
2727 'content ' => (new self )->process ($ _POST ['template ' ] ?? '' ),
28- ]);
28+ ], JSON_THROW_ON_ERROR );
2929 } catch (\Throwable $ e ) {
3030 echo json_encode ([
3131 'status ' => 'error ' ,
3232 'message ' => $ e ->getMessage (),
33- ]);
33+ ], JSON_THROW_ON_ERROR );
3434 }
3535 die;
3636 }
@@ -53,6 +53,7 @@ public function process(string $template): string
5353 throw new \RuntimeException ('Function shell_exec() is disabled on this server. ' );
5454 }
5555
56+ /** @phpstan-ignore-next-line */
5657 shell_exec ('/node_modules/.bin/mjml ' . escapeshellarg ($ sourceFile ) . ' > ' . escapeshellarg ($ finalFile ));
5758
5859 return $ this ->processReturn ($ finalFile );
You can’t perform that action at this time.
0 commit comments