This repository was archived by the owner on Jan 31, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -90,11 +90,12 @@ public function check()
90
90
return new Skip ('APC has not been enabled in CLI. ' );
91
91
}
92
92
93
- if (! function_exists ('apc_sma_info ' )) {
93
+ $ memoryAllocationMethod = \PHP_VERSION_ID < 70000 ? 'apc_sma_info ' : 'apcu_sma_info ' ;
94
+ if (! function_exists ($ memoryAllocationMethod )) {
94
95
return new Warning ('APC extension is not available ' );
95
96
}
96
97
97
- if (! $ info = apc_sma_info ()) {
98
+ if (! $ info = $ memoryAllocationMethod ()) {
98
99
return new Warning ('Unable to retrieve APC memory status information. ' );
99
100
}
100
101
Original file line number Diff line number Diff line change @@ -46,11 +46,12 @@ public function check()
46
46
return new Skip ('APC has not been enabled in CLI. ' );
47
47
}
48
48
49
- if (! function_exists ('apc_sma_info ' )) {
49
+ $ memoryAllocationMethod = \PHP_VERSION_ID < 70000 ? 'apc_sma_info ' : 'apcu_sma_info ' ;
50
+ if (! function_exists ($ memoryAllocationMethod )) {
50
51
return new Warning ('APC extension is not available ' );
51
52
}
52
53
53
- if (! $ this ->apcInfo = apc_sma_info ()) {
54
+ if (! $ this ->apcInfo = $ memoryAllocationMethod ()) {
54
55
return new Warning ('Unable to retrieve APC memory status information. ' );
55
56
}
56
57
You can’t perform that action at this time.
0 commit comments