impress-org / givewp

GiveWP - The #1 Donation Plugin for WordPress. Easily accept donations and fundraise using your WordPress website.
https://givewp.com/
GNU General Public License v3.0
340 stars 191 forks source link

Missing ctype extension causes critical error #6702

Closed canny[bot] closed 1 year ago

canny[bot] commented 1 year ago

Many large hosting companies don't have the ctype extension enabled for PHP 7.4

The fix is to add: "extension=ctype.so" to the bottom of PHP.ini file. The code that appears in line 652 of Str.php – this line:

if (! ctype_lower($value)) {

$value = preg_replace(‘/\s+/u’, ”, ucwords($value));

Additional Information:

https://www.ipage.com/help/article/how-to-enable-ctype-so-extensions-in-php-ini

https://givewp.canny.io/admin/board/bug-reports/p/missing-ctype-extension-causes-critical-error-for-paypal-standard-donations

canny[bot] commented 1 year ago

This issue has been linked to a Canny post: Missing ctype extension causes critical error for PayPal Standard donations :tada:

kjohnson commented 1 year ago

The Str facade is the only place that we directly call ctype_lower, but ctype_digit is used by multiple endpoint controllers.

kjohnson commented 1 year ago

Symfony has a set of polyfills for PHP backwards compatibility that we could you, such as the Polyfill Ctype Component.