Merge pull request #624 from FreeElephants/issue-576-disable-xdebux-warning

Issue #576: disable xdebux warning
This commit is contained in:
Matt Bonneau 2018-03-06 09:44:14 -05:00 committed by GitHub
commit bca7183c5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,7 @@ class App {
* @param LoopInterface $loop Specific React\EventLoop to bind the application to. null will create one for you. * @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) { 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); trigger_error('XDebug extension detected. Remember to disable this if performance testing or going live!', E_USER_WARNING);
} }