From e1176b7f6710ec800bc9e129ccfd37082e72687a Mon Sep 17 00:00:00 2001 From: Andrey Savchenko Date: Tue, 22 Jan 2019 16:34:25 +0200 Subject: [PATCH] Added error message on incomplete install. --- CHANGELOG.md | 1 + laps.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0214e0a..c357df9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added - WooCommerce events - PHP version and OPcache status information +- error message on incomplete install ### Fixed - headers error from new line in Server Timing diff --git a/laps.php b/laps.php index 3c4ea9f..e40da4f 100644 --- a/laps.php +++ b/laps.php @@ -16,6 +16,10 @@ if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) { require __DIR__ . '/vendor/autoload.php'; } +if ( ! class_exists( '\Rarst\Laps\Plugin' ) ) { + trigger_error( 'Laps not fully installed! Please install with Composer or download full release archive.', E_USER_ERROR ); +} + $laps = new \Rarst\Laps\Plugin(); $laps->run();