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
339 stars 191 forks source link

fix: getting PHP notices when changing the default Thousands Separator and Decimal Separator #3686

Closed raftaar1191 closed 5 years ago

raftaar1191 commented 5 years ago

Current Behavior

I currently getting PHP notices when changing the default Thousands Separator and Decimal Separator

Expected Behavior

I expect no PHP notices

Steps to Reproduce

Check the video

Visuals

Video Link: https://screencast-o-matic.com/watch/cFQbihqMj4

image

image

Debubg Log

[17-Sep-2018 07:04:56 UTC] PHP Notice: A non well formed numeric value encountered in /app/public/wp-content/plugins/Give/includes/formatting.php on line 585 [17-Sep-2018 07:04:56 UTC] PHP Stack trace: [17-Sep-2018 07:04:56 UTC] PHP 1. {main}() /app/public/wp-admin/post-new.php:0 [17-Sep-2018 07:04:56 UTC] PHP 2. include() /app/public/wp-admin/post-new.php:76 [17-Sep-2018 07:04:56 UTC] PHP 3. do_meta_boxes() /app/public/wp-admin/edit-form-advanced.php:714 [17-Sep-2018 07:04:56 UTC] PHP 4. Give_MetaBox_Form_Data->output() /app/public/wp-admin/includes/template.php:1073 [17-Sep-2018 07:04:56 UTC] PHP 5. give_render_field() /app/public/wp-content/plugins/Give/includes/admin/forms/class-metabox-form-data.php:791 [17-Sep-2018 07:04:56 UTC] PHP 6. give_donation_limit() /app/public/wp-content/plugins/Give/includes/admin/give-metabox-functions.php:214 [17-Sep-2018 07:04:56 UTC] PHP 7. give_format_decimal() /app/public/wp-content/plugins/Give/includes/admin/give-metabox-functions.php:490 [17-Sep-2018 07:04:56 UTC] PHP 8. number_format() /app/public/wp-content/plugins/Give/includes/formatting.php:585 [17-Sep-2018 07:04:56 UTC] PHP Notice: A non well formed numeric value encountered in /app/public/wp-content/plugins/Give/includes/formatting.php on line 585 [17-Sep-2018 07:04:56 UTC] PHP Stack trace: [17-Sep-2018 07:04:56 UTC] PHP 1. {main}() /app/public/wp-admin/post-new.php:0 [17-Sep-2018 07:04:56 UTC] PHP 2. include() /app/public/wp-admin/post-new.php:76 [17-Sep-2018 07:04:56 UTC] PHP 3. do_meta_boxes() /app/public/wp-admin/edit-form-advanced.php:714 [17-Sep-2018 07:04:56 UTC] PHP 4. Give_MetaBox_Form_Data->output() /app/public/wp-admin/includes/template.php:1073 [17-Sep-2018 07:04:56 UTC] PHP 5. give_render_field() /app/public/wp-content/plugins/Give/includes/admin/forms/class-metabox-form-data.php:791 [17-Sep-2018 07:04:56 UTC] PHP 6. give_donation_limit() /app/public/wp-content/plugins/Give/includes/admin/give-metabox-functions.php:214 [17-Sep-2018 07:04:56 UTC] PHP 7. give_format_decimal() /app/public/wp-content/plugins/Give/includes/admin/give-metabox-functions.php:491 [17-Sep-2018 07:04:56 UTC] PHP 8. number_format() /app/public/wp-content/plugins/Give/includes/formatting.php:585 [17-Sep-2018 07:04:56 UTC] PHP Notice: A non well formed numeric value encountered in /app/public/wp-content/plugins/Give/includes/formatting.php on line 585 [17-Sep-2018 07:04:56 UTC] PHP Stack trace: [17-Sep-2018 07:04:56 UTC] PHP 1. {main}() /app/public/wp-admin/post-new.php:0 [17-Sep-2018 07:04:56 UTC] PHP 2. include() /app/public/wp-admin/post-new.php:76 [17-Sep-2018 07:04:56 UTC] PHP 3. do_meta_boxes() /app/public/wp-admin/edit-form-advanced.php:714 [17-Sep-2018 07:04:56 UTC] PHP 4. Give_MetaBox_Form_Data->output() /app/public/wp-admin/includes/template.php:1073 [17-Sep-2018 07:04:56 UTC] PHP 5. give_render_field() /app/public/wp-content/plugins/Give/includes/admin/forms/class-metabox-form-data.php:791 [17-Sep-2018 07:04:56 UTC] PHP 6. give_donation_limit() /app/public/wp-content/plugins/Give/includes/admin/give-metabox-functions.php:214 [17-Sep-2018 07:04:56 UTC] PHP 7. give_format_decimal() /app/public/wp-content/plugins/Give/includes/admin/give-metabox-functions.php:490 [17-Sep-2018 07:04:56 UTC] PHP 8. number_format() /app/public/wp-content/plugins/Give/includes/formatting.php:585 [17-Sep-2018 07:04:56 UTC] PHP Notice: A non well formed numeric value encountered in /app/public/wp-content/plugins/Give/includes/formatting.php on line 585 [17-Sep-2018 07:04:56 UTC] PHP Stack trace: [17-Sep-2018 07:04:56 UTC] PHP 1. {main}() /app/public/wp-admin/post-new.php:0 [17-Sep-2018 07:04:56 UTC] PHP 2. include() /app/public/wp-admin/post-new.php:76 [17-Sep-2018 07:04:56 UTC] PHP 3. do_meta_boxes() /app/public/wp-admin/edit-form-advanced.php:714 [17-Sep-2018 07:04:56 UTC] PHP 4. Give_MetaBox_Form_Data->output() /app/public/wp-admin/includes/template.php:1073 [17-Sep-2018 07:04:56 UTC] PHP 5. give_render_field() /app/public/wp-content/plugins/Give/includes/admin/forms/class-metabox-form-data.php:791 [17-Sep-2018 07:04:56 UTC] PHP 6. give_donation_limit() /app/public/wp-content/plugins/Give/includes/admin/give-metabox-functions.php:214 [17-Sep-2018 07:04:56 UTC] PHP 7. give_format_decimal() /app/public/wp-content/plugins/Give/includes/admin/give-metabox-functions.php:491 [17-Sep-2018 07:04:56 UTC] PHP 8. number_format() /app/public/wp-content/plugins/Give/includes/formatting.php:585 [17-Sep-2018 07:04:57 UTC] PHP Notice: A non well formed numeric value encountered in /app/public/wp-content/plugins/Give/includes/formatting.php on line 585 [17-Sep-2018 07:04:57 UTC] PHP Stack trace: [17-Sep-2018 07:04:57 UTC] PHP 1. {main}() /app/public/wp-admin/post-new.php:0 [17-Sep-2018 07:04:57 UTC] PHP 2. include() /app/public/wp-admin/post-new.php:76 [17-Sep-2018 07:04:57 UTC] PHP 3. do_meta_boxes() /app/public/wp-admin/edit-form-advanced.php:714 [17-Sep-2018 07:04:57 UTC] PHP 4. Give_MetaBox_Form_Data->output() /app/public/wp-admin/includes/template.php:1073 [17-Sep-2018 07:04:57 UTC] PHP 5. give_render_field() /app/public/wp-content/plugins/Give/includes/admin/forms/class-metabox-form-data.php:791 [17-Sep-2018 07:04:57 UTC] PHP 6. give_donation_limit() /app/public/wp-content/plugins/Give/includes/admin/give-metabox-functions.php:214 [17-Sep-2018 07:04:57 UTC] PHP 7. give_format_decimal() /app/public/wp-content/plugins/Give/includes/admin/give-metabox-functions.php:490 [17-Sep-2018 07:04:57 UTC] PHP 8. number_format() /app/public/wp-content/plugins/Give/includes/formatting.php:585 [17-Sep-2018 07:04:57 UTC] PHP Notice: A non well formed numeric value encountered in /app/public/wp-content/plugins/Give/includes/formatting.php on line 585 [17-Sep-2018 07:04:57 UTC] PHP Stack trace: [17-Sep-2018 07:04:57 UTC] PHP 1. {main}() /app/public/wp-admin/post-new.php:0 [17-Sep-2018 07:04:57 UTC] PHP 2. include() /app/public/wp-admin/post-new.php:76 [17-Sep-2018 07:04:57 UTC] PHP 3. do_meta_boxes() /app/public/wp-admin/edit-form-advanced.php:714 [17-Sep-2018 07:04:57 UTC] PHP 4. Give_MetaBox_Form_Data->output() /app/public/wp-admin/includes/template.php:1073 [17-Sep-2018 07:04:57 UTC] PHP 5. give_render_field() /app/public/wp-content/plugins/Give/includes/admin/forms/class-metabox-form-data.php:791 [17-Sep-2018 07:04:57 UTC] PHP 6. give_donation_limit() /app/public/wp-content/plugins/Give/includes/admin/give-metabox-functions.php:214 [17-Sep-2018 07:04:57 UTC] PHP 7. give_format_decimal() /app/public/wp-content/plugins/Give/includes/admin/give-metabox-functions.php:491 [17-Sep-2018 07:04:57 UTC] PHP 8. number_format() /app/public/wp-content/plugins/Give/includes/formatting.php:585 [17-Sep-2018 07:04:57 UTC] PHP Notice: A non well formed numeric value encountered in /app/public/wp-content/plugins/Give/includes/formatting.php on line 585 [17-Sep-2018 07:04:57 UTC] PHP Stack trace: [17-Sep-2018 07:04:57 UTC] PHP 1. {main}() /app/public/wp-admin/post-new.php:0 [17-Sep-2018 07:04:57 UTC] PHP 2. include() /app/public/wp-admin/post-new.php:76 [17-Sep-2018 07:04:57 UTC] PHP 3. do_meta_boxes() /app/public/wp-admin/edit-form-advanced.php:714 [17-Sep-2018 07:04:57 UTC] PHP 4. Give_MetaBox_Form_Data->output() /app/public/wp-admin/includes/template.php:1073 [17-Sep-2018 07:04:57 UTC] PHP 5. give_render_field() /app/public/wp-content/plugins/Give/includes/admin/forms/class-metabox-form-data.php:791 [17-Sep-2018 07:04:57 UTC] PHP 6. give_donation_limit() /app/public/wp-content/plugins/Give/includes/admin/give-metabox-functions.php:214 [17-Sep-2018 07:04:57 UTC] PHP 7. give_format_decimal() /app/public/wp-content/plugins/Give/includes/admin/give-metabox-functions.php:490 [17-Sep-2018 07:04:57 UTC] PHP 8. number_format() /app/public/wp-content/plugins/Give/includes/formatting.php:585 [17-Sep-2018 07:04:57 UTC] PHP Notice: A non well formed numeric value encountered in /app/public/wp-content/plugins/Give/includes/formatting.php on line 585 [17-Sep-2018 07:04:57 UTC] PHP Stack trace: [17-Sep-2018 07:04:57 UTC] PHP 1. {main}() /app/public/wp-admin/post-new.php:0 [17-Sep-2018 07:04:57 UTC] PHP 2. include() /app/public/wp-admin/post-new.php:76 [17-Sep-2018 07:04:57 UTC] PHP 3. do_meta_boxes() /app/public/wp-admin/edit-form-advanced.php:714 [17-Sep-2018 07:04:57 UTC] PHP 4. Give_MetaBox_Form_Data->output() /app/public/wp-admin/includes/template.php:1073 [17-Sep-2018 07:04:57 UTC] PHP 5. give_render_field() /app/public/wp-content/plugins/Give/includes/admin/forms/class-metabox-form-data.php:791 [17-Sep-2018 07:04:57 UTC] PHP 6. give_donation_limit() /app/public/wp-content/plugins/Give/includes/admin/give-metabox-functions.php:214 [17-Sep-2018 07:04:57 UTC] PHP 7. give_format_decimal() /app/public/wp-content/plugins/Give/includes/admin/give-metabox-functions.php:491 [17-Sep-2018 07:04:57 UTC] PHP 8. number_format() /app/public/wp-content/plugins/Give/includes/formatting.php:585

Environment

WordPress System Info ### WordPress Environment ### Home URL: http://givewp.local Site URL: http://givewp.local WP Version: 4.9.8 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: ✔ WP Cron: ✔ Language: en_US Permalink Structure: /%year%/%monthnum%/%day%/%postname%/ Show on Front: posts Table Prefix Length: wp_ Table Prefix Length: 3 Table Prefix Status: Acceptable Admin AJAX: Accessible Registered Post Statuses: publish, future, draft, pending, private, trash, auto-draft, inherit, request-pending, request-confirmed, request-failed, request-completed, refunded, failed, revoked, cancelled, abandoned, processing, preapproval ### Server Environment ### Hosting Provider: DBH: localhost, SRV: givewp.local TLS Connection: Connection uses TLS 1.2 TLS Connection: Probably Okay Server Info: nginx/1.10.1 PHP Version: 7.0.3 PHP Post Max Size: 1,000 MB PHP Time Limit: 900 PHP Max Input Vars: 3000 PHP Max Upload Size: 1,000 MB cURL Version: ❌ 7.38.0, OpenSSL/1.0.1t - We recommend a minimum cURL version of 7.40. SUHOSIN Installed: – MySQL Version: ❌ 5.5.55 - We recommend a minimum MySQL version of 5.6. See: WordPress Requirements Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ gzip: ✔ GD Graphics Library: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Give Configuration ### Give Version: 2.2.4 Give Cache: Enabled Database Updates: All DB Updates Completed. Give Cache: Enabled Give Cache: ✔New Donation✔Donation Receipt✔New Offline Donation✔Offline Donation Instructions✔New User Registration✔User Registration Information✔Donor Note✔Email access Upgraded From: – Test Mode: Enabled Currency Code: EUR Currency Position: Before Decimal Separator: , Thousands Separator: . Success Page: http://givewp.local/donation-confirmation/ Failure Page: http://givewp.local/donation-failed/ Donation History Page: http://givewp.local/donation-history/ Give Forms Slug: /donations/ Enabled Payment Gateways: Test Donation, Offline Donation Default Payment Gateway: Test Donation PayPal IPN Verification: Enabled PayPal IPN Notifications: N/A Donor Email Access: Enabled ### Active Give Add-ons ### ### Other Active Plugins ### ### Inactive Plugins ### BuddyPress: by The BuddyPress Community – 3.0.0 Caldera Forms: by Caldera Labs – 1.5.9.1 Charitable: by WP Charitable – 1.6.1 Debug Bar: by wordpressdotorg – 0.9 Debug Bar Console: by koopersmith – 0.3 Debug Bar Cron: by Zack Tollman, Helen Hou-Sandi – 0.1.2 Debug Bar Extender: by Thorsten Ott, Automattic – 0.5 Developer: by Automattic – 1.2.6 Duplicate Post: by Enrico Battocchi – 3.2.2 Email Cop: by Ashfame – 0.1.1 Give - 2Checkout Gateway: by WordImpress – 1.1.1 Give - AmeriCloud Payments: by AmeriCloud Solutions, Inc. – 1.2.0 Give - Authorize.net Gateway: by WordImpress – 1.4.2 Give - AWeber: by WordImpress – 1.0.3 Give - Braintree Gateway: by WordImpress – 1.2.2 Give - CCAvenue Gateway: by WordImpress – 1.0.2 Give - Constant Contact: by WordImpress – 1.2.1 Give - ConvertKit: by WordImpress – 1.0.2 Give - Currency Switcher: by WordImpress – 1.2.2 Give - Display Donors: by WordImpress, LLC – 1.0 Give - Donation Upsells for WooCommerce: by WordImpress – 1.0.3 Give - Dwolla Gateway: by WordImpress – 1.1.2 Give - Email Reports: by WordImpress – 1.1.2 Give - Fee Recovery: by GiveWP – 1.7.2 Give - Form Countdown: by WordImpress – 1.0.1 Give - Form Field Manager: by WordImpress – 1.4.0 Give - Gift Aid: by WordImpress – 1.1.6 Give - GoCardless Gateway: by WordImpress – 1.2.1 Give - Google Analytics Donation Tracking: by GiveWP – 1.2.1 Give - iATS Payment Solutions: by WordImpress – 1.0.3 Give - MailChimp: by WordImpress – 1.4.1 Give - Manual Donations: by WordImpress – 1.4.1 Give - Mollie Gateway: by WordImpress – 1.1.2 Give - PayFast Payment Gateway: by WordImpress – 1.0.2 Give - Paymill Gateway: by WordImpress – 1.1 Give - PayPal Pro Gateway: by GiveWP – 1.2.0 Give - Paytm Gateway: by WordImpress – 1.0 Give - PayUmoney: by WordImpress – 1.0.1 Give - PDF Receipts: by WordImpress – 2.3.0 Give - Per Form Gateways: by WordImpress – 1.0.1 Give - Razorpay: by WordImpress – 1.2.0 Give - Razorpay Recurring: by WP Buffs – 1.0 Give - Recurring Donations: by WordImpress – 1.8.0 Give - Sofort Payment Gateway: by WordImpress, CoachBirgit – 1.0 Give - Square: by GiveWP – 1.0.0 Give - Stripe Gateway: by GiveWP – 2.1.0 Give - Tributes: by WordImpress – 1.5.0 Give - WePay Gateway: by WordImpress – 1.3.1 Give - Zapier: by WordImpress – 1.2.1 Gravity Forms: by rocketgenius – 2.2.6 Gravity Forms Signature Add-On: by Rocketgenius – 3.4 Gutenberg: by Gutenberg Team – 3.6.2 Loco Translate: by Tim Whitlock – 2.1.4 Log Deprecated Notices: by Andrew Nacin – 0.4 Log Viewer: by Markus Fischbacher – 14.05.04 Monster Widget: by Automattic – 0.3 PHP Compatibility Checker: by WP Engine – 1.4.5 Polylang: by Frédéric Demarle – 2.3.6 qTranslate-X: by qTranslate Team – 3.4.6.8 Query Monitor: by John Blackbourn & contributors – 3.0.1 Rewrite Rules Inspector: by Daniel Bachhuber, Automattic – 1.2.1 User Switching: by John Blackbourn & contributors – 1.3.1 WooCommerce: by Automattic – 3.4.5 WooCommerce Paytm Payment Gateway: by Paytm – 0.2 WordPress Beta Tester: by Peter Westwood – 1.2.2 WP Hide & Security Enhancer: by Nsp Code – 1.4.9.1 WPML Multilingual CMS: by OnTheGoSystems – 3.9.4 Wp Paytm Pay.: by FTI Technologies – 1.1 WP Rocket: by WP Media – 3.0.5.1 WPS Hide Login: by WPServeur, NicolasKulka, tabrisrp – 1.3.4.2 ### Active MU Plugins ### Must Used Plugin: by raftaar1191 – 1.0 ### Theme ### Name: Twenty Seventeen Version: 1.7 Author URL: https://wordpress.org/ Child Theme: No – If you're modifying Give on a parent theme you didn't build personally, then we recommend using a child theme. See: How to Create a Child Theme
ravinderk commented 5 years ago

Note this issue raised because of this fix: https://github.com/wordimpress/give/issues/3602

raftaar1191 commented 5 years ago

Working perfectly