Skip to content

Commit f4a9170

Browse files
committed
Revert "Fix broken merge on Zend Opcache check."
This reverts commit 6eeadf5.
1 parent 6eeadf5 commit f4a9170

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/Doctrine/Common/Annotations/AnnotationReader.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,20 @@ static public function addGlobalIgnoredName($name)
154154
*/
155155
public function __construct()
156156
{
157+
if (extension_loaded('Zend Optimizer+') && (ini_get('zend_optimizerplus.save_comments') === "0" || ini_get('opcache.save_comments') === "0")) {
158+
throw AnnotationException::optimizerPlusSaveComments();
159+
}
160+
161+
if (extension_loaded('Zend OPcache') && ini_get('opcache.save_comments') == 0) {
162+
throw AnnotationException::optimizerPlusSaveComments();
163+
}
164+
157165
if (PHP_VERSION_ID < 70000) {
158166
if (extension_loaded('Zend Optimizer+') && (ini_get('zend_optimizerplus.load_comments') === "0" || ini_get('opcache.load_comments') === "0")) {
159167
throw AnnotationException::optimizerPlusLoadComments();
160168
}
161169

162-
if (extension_loaded('Zend OPcache') && ini_get('opcache.load_comments') === "0") {
170+
if (extension_loaded('Zend OPcache') && ini_get('opcache.load_comments') == 0) {
163171
throw AnnotationException::optimizerPlusLoadComments();
164172
}
165173
}

0 commit comments

Comments
 (0)