Skip to content

Commit ad2d34e

Browse files
author
Egor Nelyubov
committed
Add check for PHP version to make the code work on PHP 5.6
1 parent 2cc87fd commit ad2d34e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Codeception/Lib/Parser.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,10 @@ public static function getClassesFromFile($file)
170170
}
171171
}
172172

173-
$tokens = null;
174-
gc_mem_caches();
173+
if (PHP_MAJOR_VERSION > 5) {
174+
$tokens = null;
175+
gc_mem_caches();
176+
}
175177

176178
return $classes;
177179
}

0 commit comments

Comments
 (0)