File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ public function offsetUnset($offset)
60
60
*/
61
61
protected function formatString ($ str )
62
62
{
63
- if (extension_loaded ( ' mbstring ' )) {
63
+ if (function_exists ( ' mb_convert_case ' )) {
64
64
$ str = mb_convert_case ($ str , MB_CASE_TITLE , 'UTF-8 ' );
65
65
} else {
66
66
$ str = $ this ->lowerize ($ str );
@@ -82,7 +82,7 @@ protected function formatString($str)
82
82
*/
83
83
protected function lowerize ($ str )
84
84
{
85
- return extension_loaded ( ' mbstring ' ) ? mb_strtolower ($ str , 'UTF-8 ' ) : strtolower ($ str );
85
+ return function_exists ( ' mb_strtolower ' ) ? mb_strtolower ($ str , 'UTF-8 ' ) : strtolower ($ str );
86
86
}
87
87
88
88
/**
@@ -94,6 +94,6 @@ protected function lowerize($str)
94
94
*/
95
95
protected function upperize ($ str )
96
96
{
97
- return extension_loaded ( ' mbstring ' ) ? mb_strtoupper ($ str , 'UTF-8 ' ) : strtoupper ($ str );
97
+ return function_exists ( ' mb_strtoupper ' ) ? mb_strtoupper ($ str , 'UTF-8 ' ) : strtoupper ($ str );
98
98
}
99
99
}
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- if (!extension_loaded ( ' curl ' ) || ! function_exists ('curl_init ' )) {
3
+ if (!function_exists ('curl_init ' )) {
4
4
die (<<<EOT
5
5
cURL has to be enabled!
6
6
EOT
You can’t perform that action at this time.
0 commit comments