Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev/core#1017: Always bootstrap CRM_Utils_System for extern/ipn.php #14428

Closed
wants to merge 1 commit into from

Conversation

agileware-fj
Copy link
Contributor

Overview

Changes the legacy Paypal IPN endpoint to always bootstrap the user system. This was already being done for Joomla, Drupal, and Backdrop, but needs to happen for WordPress as well.

Before

Posting to extern/ipn.php fails on WordPress with Uncaught Error: Call to undefined function get_option()

After

extern.ipn.php works on WordPress as well as Joomla, Drupal, and Backdrop

@civibot civibot bot added the master label Jun 5, 2019
@civibot
Copy link

civibot bot commented Jun 5, 2019

(Standard links)

@seamuslee001
Copy link
Contributor

@eileenmcnaughton thoughts?

@agileware-fj
Copy link
Contributor Author

I'll say it again here: I don't know why the Joomla call would be different.

Seeing as I don't have any Joomla systems to test this on, I've left the switch in though.

@seamuslee001
Copy link
Contributor

also ping @mattwire @MegaphoneJon

@eileenmcnaughton
Copy link
Contributor

if that is tested with WP we should merge - but into 5.14 rc

@agileware-fj
Copy link
Contributor Author

This is tested on WordPress insofar as:

-bash-4.2$ php -a
Interactive shell

php > require_once 'wp-content/plugins/civicrm/civicrm/civicrm.config.php';
php > print CRM_Core_Config::singleton()->userSystem->getTimeZoneString();
PHP Warning:  Uncaught Error: Call to undefined function get_option() in /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php:783
Stack trace:
#0 php shell code(1): CRM_Utils_System_WordPress->getTimeZoneString()
#1 {main}
  thrown in /var/www/vhosts/example.org/httpdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php on line 783
php > CRM_Utils_System::loadBootStrap([], FALSE);
php > print CRM_Core_Config::singleton()->userSystem->getTimeZoneString();
Australia/Melbourne

@eileenmcnaughton
Copy link
Contributor

erm - does that show that the patch works....

@agileware-fj
Copy link
Contributor Author

It shows that bootstrapping WordPress fixes the problems introduced in e8780288 at any rate.

@eileenmcnaughton
Copy link
Contributor

@agileware-fj ok... well if you want to do a PR against the 5.14 branch I'm happy to merge to the rc

@agileware-fj
Copy link
Contributor Author

@eileenmcnaughton alright, done – #14430

@eileenmcnaughton
Copy link
Contributor

Closing as replaced by rc pr ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants