Skip to content

Commit

Permalink
Guard scripts from being run in non-CLI contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Oct 3, 2022
1 parent 90425fd commit 1069c7a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Resources/bin/var-dump-server
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
* file that was distributed with this source code.
*/

if ('cli' !== PHP_SAPI) {
throw new Exception('This script must be run from the command line.');
}

/**
* Starts a dump server to collect and output dumps on a single place with multiple formats support.
*
Expand Down

0 comments on commit 1069c7a

Please sign in to comment.