From 2fb7f9129e1537f88764202cb9a962198aafe275 Mon Sep 17 00:00:00 2001 From: Lars Jung Date: Tue, 21 Jun 2016 03:16:35 +0200 Subject: [PATCH] Add source check. --- src/_h5ai/public/index.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/_h5ai/public/index.php b/src/_h5ai/public/index.php index 9e64788f..f6681f9a 100644 --- a/src/_h5ai/public/index.php +++ b/src/_h5ai/public/index.php @@ -8,5 +8,10 @@ if (!function_exists('version_compare') || version_compare(PHP_VERSION, MIN_PHP_ exit('[ERR] h5ai requires PHP ' . MIN_PHP_VERSION . ' or later, but found PHP ' . PHP_VERSION); } +if (substr(H5AI_VERSION, 0, 2) === '{{') { + header('Content-type: text/plain;charset=utf-8'); + exit('[ERR] h5ai sources must be preprocessed to work correctly'); +} + require_once __DIR__ . '/../private/php/class-bootstrap.php'; Bootstrap::run();