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

bin/*, extern/* - Fix leak of "$config" in global namespace #16702

Merged
merged 1 commit into from
Mar 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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