Skip to content

Commit

Permalink
Use RATCHET_DISABLE_XDEBUG_WARN env var for disable user warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
samizdam committed Mar 2, 2018
1 parent 77b879c commit 0b6fac2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Ratchet/App.php
Expand Up @@ -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);
}

Expand Down

0 comments on commit 0b6fac2

Please sign in to comment.