From 0b6fac212cfcda6b91d2123e0d5d644b07f993fd Mon Sep 17 00:00:00 2001 From: samizdam Date: Sat, 3 Mar 2018 00:19:44 +0300 Subject: [PATCH] Use RATCHET_DISABLE_XDEBUG_WARN env var for disable user warning. --- src/Ratchet/App.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ratchet/App.php b/src/Ratchet/App.php index f378534..da41838 100644 --- a/src/Ratchet/App.php +++ b/src/Ratchet/App.php @@ -62,7 +62,7 @@ class App { * @param LoopInterface $loop Specific React\EventLoop to bind the application to. null will create one for you. */ public function __construct($httpHost = 'localhost', $port = 8080, $address = '127.0.0.1', LoopInterface $loop = null) { - if (extension_loaded('xdebug')) { + if (extension_loaded('xdebug') && getenv('RATCHET_DISABLE_XDEBUG_WARN') === false) { trigger_error('XDebug extension detected. Remember to disable this if performance testing or going live!', E_USER_WARNING); }