Skip to content

Commit

Permalink
Add version check
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Apr 11, 2018
1 parent dc0ab17 commit c798efe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Loop.php
Expand Up @@ -247,7 +247,7 @@ public static function enable(string $watcherId) {
* @return void
*/
public static function disable(string $watcherId) {
if (!isset(self::$driver)) {
if (\PHP_VERSION_ID < 70200 && !isset(self::$driver)) {
// Prior to PHP 7.2, self::$driver may be unset during destruct.
// See https://github.com/amphp/amp/issues/212.
return;
Expand All @@ -267,7 +267,7 @@ public static function disable(string $watcherId) {
* @return void
*/
public static function cancel(string $watcherId) {
if (!isset(self::$driver)) {
if (\PHP_VERSION_ID < 70200 && !isset(self::$driver)) {
// Prior to PHP 7.2, self::$driver may be unset during destruct.
// See https://github.com/amphp/amp/issues/212.
return;
Expand Down Expand Up @@ -303,7 +303,7 @@ public static function reference(string $watcherId) {
* @return void
*/
public static function unreference(string $watcherId) {
if (!isset(self::$driver)) {
if (\PHP_VERSION_ID < 70200 && !isset(self::$driver)) {
// Prior to PHP 7.2, self::$driver may be unset during destruct.
// See https://github.com/amphp/amp/issues/212.
return;
Expand Down

0 comments on commit c798efe

Please sign in to comment.