Skip to content

Commit 762cddc

Browse files
committed
Fix sending messages in disabled mode
Fixes #7
1 parent 160e166 commit 762cddc

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"require": {
3434
"php": ">=5.3.0",
3535
"illuminate/support": "5.*",
36-
"php-console/php-console": ">=3.1"
36+
"php-console/php-console": ">=3.1.4 <4.0"
3737
},
3838
"autoload": {
3939
"psr-0": {

src/PhpConsole/Laravel/ServiceProvider.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,11 @@ protected function initPhpConsole() {
108108
Helper::register();
109109
}
110110

111-
if (!$this->isEnabled || !Connector::getInstance()->isActiveClient()) {
111+
$isActiveClient = $connector->isActiveClient();
112+
if (!$this->isEnabled || !$isActiveClient) {
113+
if($isActiveClient) {
114+
$connector->disable();
115+
}
112116
return;
113117
}
114118

0 commit comments

Comments
 (0)