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

[Give 2.0] Snippet Library Snippet causing fatal error on 2.0 #2625

Closed Benunc closed 6 years ago

Benunc commented 6 years ago

Issue Overview

Give 2.0 breaks sites using at least one of the snippets from our snippet library

Expected Behavior

Snippets should fail gracefully. Customers (though they are responsible for custom code) should not be broadsided by fatal errors upon updating.

Current Behavior

Fatal errors

Steps to Reproduce (for bugs)

  1. Copy/paste snippet from https://github.com/WordImpress/Give-Snippet-Library/blob/master/gateway-customizations/offline-donations-customize-emails.php into a functionality plugin or functions.php
  2. Update to 2.0
  3. Fatal errors.

This is the first snippet I found that creates a fatal error, but I will test all of them over the coming days.

WordPress Environment

### WordPress Environment ### Home URL: http://1give.test Site URL: http://1give.test WP Version: 4.8.4 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: 3 Table Prefix Status: Acceptable Admin AJAX: Accessible Registered Post Statuses: publish, future, draft, pending, private, trash, auto-draft, inherit, refunded, failed, revoked, cancelled, abandoned, processing, preapproval ### Server Environment ### Hosting Provider: DBH: localhost, SRV: 1give.test TLS Connection: Connection uses TLS 1.2 TLS Connection: Probably Okay Server Info: nginx/1.10.1 PHP Version: 7.1.4 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.6.34 Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ gzip: ✔ GD Graphics Library: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Give Configuration ### Give Version: 2.0.0 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 Donor Registration✔Donor Register✔Email access Upgraded From: – Test Mode: Enabled Currency Code: USD Currency Position: Before Decimal Separator: . Thousands Separator: , Success Page: http://1give.test/donation-confirmation/ Failure Page: http://1give.test/donation-failed/ Donation History Page: http://1give.test/donation-history/ Give Forms Slug: /donations/ Enabled Payment Gateways: Test Donation, Offline Donation, GoCardless Default Payment Gateway: Test Donation PayPal IPN Verification: Enabled PayPal IPN Notifications: N/A Admin Email Notifications: Disabled Donor Email Access: Enabled ### Session Configuration ### Give Use Sessions: Enabled Session: Disabled ### Active Give Add-ons ### Give - Form Field Manager: ❌ Unlicensed – by WordImpress – 1.2.3 Give - GoCardless Gateway: ❌ Unlicensed – by WordImpress – 1.0.0 Give - Per Form Emails: ❌ Unlicensed – by WordImpress – 1.0.2 ### Other Active Plugins ### Ben's Helper Functions: by BenUNC – Give to ZBS CRM Connector: by https://zerobscrm.com – 1.0.1 Zero BS CRM: by Zero BS CRM – 2.16.6 ### Inactive Plugins ### Give - 2Checkout Gateway: by WordImpress – 1.0.2 Give - Authorize.net Gateway: by WordImpress – 1.2.3 Give - Braintree Gateway: by WordImpress – 1.1.1 Give - Constant Contact: by WordImpress – 1.2.1 Give - ConvertKit: by WordImpress – 1.0.1 Give - CSV Toolbox: by WordImpress – 1.0 Give - Dwolla Gateway: by WordImpress – 1.1.2 Give - Email Reports: by WordImpress – 1.0.1 Give - Fee Recovery: by WordImpress – 1.2.4 Give - Form Countdown: by WordImpress – 1.0 Give - Google Analytics Donation Tracking: by WordImpress – 1.1.1 Give - MailChimp: by WordImpress – 1.3.6 Give - Manual Donations: by WordImpress – 1.2 Give - Old Meta Switcher: by WordImpress – 1.0 Give - Paymill Gateway: by WordImpress – 1.1 Give - PayPal Pro Gateway: by WordImpress – 1.1.4 Give - PayUmoney: by WordImpress – 1.0.1 Give - PDF Receipts: by WordImpress – 2.0.8 Give - Per Form Gateways: by WordImpress – 1.0.1 Give - Recurring Donations: by WordImpress – 1.4 Give - Recurring Helper: by WordImpress – 1.0 Give - Stripe Gateway: by WordImpress – 1.5 Give - Tributes: by WordImpress – 1.1 Give - Update Goal Progress: by Matt Cromwell – 1.0 Give - WePay Gateway: by WordImpress – 1.3.1 Give - WP All Import Addon: by Ben Meredith – 1.0 Give - Zapier: by WordImpress – 1.1.2 ### Theme ### Name: Twenty Seventeen Version: 1.3 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
DevinWalker commented 6 years ago

What fatal error did you receive? I'm seeing PHP notices but no fatal errors. Please reopen if the error severity is fatal. Otherwise, we can address the PHP notice within the snippet repo itself. Here's what I'm seeing:

2018-01-05_17-49-12