Skip to content

Commit

Permalink
Merge pull request #16702 from seamuslee001/5.24
Browse files Browse the repository at this point in the history
bin/*, extern/* - Fix leak of "$config" in global namespace
  • Loading branch information
totten authored Mar 23, 2020
2 parents db6701e + d523d24 commit 27a591c
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion bin/ContributionProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ public static function processAPIContribution($params) {
session_start();
require_once '../civicrm.config.php';
require_once 'CRM/Core/Config.php';
$config = CRM_Core_Config::singleton();
CRM_Core_Config::singleton();

CRM_Utils_System::authenticateScript(TRUE);

Expand Down
2 changes: 1 addition & 1 deletion bin/cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
require_once '../civicrm.config.php';
require_once 'CRM/Core/Config.php';
require_once 'CRM/Utils/Request.php';
$config = CRM_Core_Config::singleton();
CRM_Core_Config::singleton();

CRM_Utils_System::authenticateScript(TRUE);

Expand Down
2 changes: 1 addition & 1 deletion extern/authorizeIPN.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
session_start();

require_once '../civicrm.config.php';
$config = CRM_Core_Config::singleton();
CRM_Core_Config::singleton();
$log = new CRM_Utils_SystemLogger();
$log->alert('payment_notification processor_name=AuthNet', $_REQUEST);

Expand Down
2 changes: 1 addition & 1 deletion extern/cxn.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

require_once '../civicrm.config.php';
$config = CRM_Core_Config::singleton();
CRM_Core_Config::singleton();

CRM_Utils_System::loadBootStrap(array(), FALSE);

Expand Down
2 changes: 1 addition & 1 deletion extern/ipn.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

/* Cache the real UF, override it with the SOAP environment */

$config = CRM_Core_Config::singleton();
CRM_Core_Config::singleton();
$log = new CRM_Utils_SystemLogger();
if (empty($_GET)) {
$log->alert('payment_notification processor_name=PayPal', $_REQUEST);
Expand Down
2 changes: 1 addition & 1 deletion extern/open.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
require_once 'CRM/Utils/Rule.php';
require_once 'CRM/Utils/Request.php';

$config = CRM_Core_Config::singleton();
CRM_Core_Config::singleton();
$queue_id = CRM_Utils_Request::retrieveValue('q', 'Positive', NULL, FALSE, 'GET');
if (!$queue_id) {
echo "Missing input parameters\n";
Expand Down
2 changes: 1 addition & 1 deletion extern/pxIPN.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
require_once '../civicrm.config.php';
require_once 'CRM/Core/Config.php';

$config = CRM_Core_Config::singleton();
CRM_Core_Config::singleton();
$log = new CRM_Utils_SystemLogger();
$log->alert('payment_notification processor_name=Payment_Express', $_REQUEST);
/*
Expand Down
2 changes: 1 addition & 1 deletion extern/rest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

require_once '../civicrm.config.php';
$config = CRM_Core_Config::singleton();
CRM_Core_Config::singleton();

if (defined('PANTHEON_ENVIRONMENT')) {
ini_set('session.save_handler', 'files');
Expand Down
4 changes: 2 additions & 2 deletions extern/soap.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@

/* Cache the real UF, override it with the SOAP environment */

$config = CRM_Core_Config::singleton();
$civicrmConfig = CRM_Core_Config::singleton();

$server->setClass('CRM_Utils_SoapServer', $config->userFrameworkClass);
$server->setClass('CRM_Utils_SoapServer', $civicrmConfig->userFrameworkClass);

$server->setPersistence(SOAP_PERSISTENCE_SESSION);

Expand Down
2 changes: 1 addition & 1 deletion extern/url.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require_once 'CRM/Core/Error.php';
require_once 'CRM/Utils/Array.php';

$config = CRM_Core_Config::singleton();
CRM_Core_Config::singleton();

// To keep backward compatibility for URLs generated
// by CiviCRM < 1.7, we check for the q variable as well.
Expand Down

0 comments on commit 27a591c

Please sign in to comment.