Skip to content

Commit bf76a2e

Browse files
committed
Presenter: workaround for PhpStorm bug [Closes #306]
1 parent 94d63eb commit bf76a2e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Application/UI/Presenter.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,10 @@ public function getContext(): Nette\DI\Container
14201420
throw new Nette\InvalidStateException('Context has not been set.');
14211421
}
14221422

1423-
trigger_error(__METHOD__ . '() is deprecated, use dependency injection.', E_USER_DEPRECATED);
1423+
if (!function_exists('xdebug_is_debugger_active') || !xdebug_is_debugger_active()) {
1424+
trigger_error(__METHOD__ . '() is deprecated, use constructor injection instead.', E_USER_DEPRECATED);
1425+
}
1426+
14241427
return $this->context;
14251428
}
14261429

0 commit comments

Comments
 (0)