From d2f1ade70253318412a7a693aec054ca1ba33462 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Tue, 1 Apr 2014 12:16:52 +0200 Subject: [PATCH] add php sapi test on faker scripts --- Thelia | 4 +++- install/faker.php | 4 ++++ install/faker_100categories_1000products_4locales.php | 4 +++- install/faker_add_ecotax.php | 4 +++- install/import.php | 4 +++- install/tax_faker.php | 4 +++- 6 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Thelia b/Thelia index a161b610f..ab1dc7a07 100755 --- a/Thelia +++ b/Thelia @@ -1,6 +1,8 @@ #!/usr/bin/env php . */ /* */ /*************************************************************************************/ - +if (php_sapi_name() != 'cli') { + throw new \Exception('this script can only be launched with cli sapi'); +} require __DIR__ . '/../core/bootstrap.php'; $thelia = new Thelia\Core\Thelia("dev", true); diff --git a/install/tax_faker.php b/install/tax_faker.php index ea3080872..2ac350601 100644 --- a/install/tax_faker.php +++ b/install/tax_faker.php @@ -1,5 +1,7 @@