fix phpstan

This commit is contained in:
Frédéric FRANCE 2024-12-11 20:38:48 +01:00
parent 69ecc4c743
commit a7614342cd
No known key found for this signature in database
GPG Key ID: C06E4A9656127239
2 changed files with 9 additions and 20 deletions

View File

@ -1,7 +1,8 @@
<?php
/* Copyright (C) 2010-2011 Laurent Destailleur <eldy@users.sourceforge.org>
* Copyright (C) 2011 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
/* Copyright (C) 2010-2011 Laurent Destailleur <eldy@users.sourceforge.org>
* Copyright (C) 2011 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -57,22 +58,10 @@ if (getDolGlobalString('PAYPAL_API_SANDBOX') || GETPOST('forcesandbox', 'alpha')
}
// Clean parameters
$PAYPAL_API_USER = "";
if (getDolGlobalString('PAYPAL_API_USER')) {
$PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER');
}
$PAYPAL_API_PASSWORD = "";
if (getDolGlobalString('PAYPAL_API_PASSWORD')) {
$PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD');
}
$PAYPAL_API_SIGNATURE = "";
if (getDolGlobalString('PAYPAL_API_SIGNATURE')) {
$PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE');
}
$PAYPAL_API_SANDBOX = "";
if (getDolGlobalString('PAYPAL_API_SANDBOX')) {
$PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX');
}
$PAYPAL_API_USER = getDolGlobalString('PAYPAL_API_USER');
$PAYPAL_API_PASSWORD = getDolGlobalString('PAYPAL_API_PASSWORD');
$PAYPAL_API_SIGNATURE = getDolGlobalString('PAYPAL_API_SIGNATURE');
$PAYPAL_API_SANDBOX = getDolGlobalString('PAYPAL_API_SANDBOX');
// Proxy
$PROXY_HOST = getDolGlobalString('MAIN_PROXY_HOST');

View File

@ -292,7 +292,7 @@ $urlko = preg_replace('/&$/', '', $urlko); // Remove last &
';
if ((empty($paymentmethod) || $paymentmethod == 'paypal') && isModEnabled('paypal')) {
global $PAYPAL_API_SANDBOX, $PAYPAL_API_OK, $PAYPAL_API_KO, $PAYPAL_API_PASSWORD, $PAYPAL_API_SIGNATURE;
global $PAYPAL_API_SANDBOX, $PAYPAL_API_OK, $PAYPAL_API_KO, $PAYPAL_API_USER, $PAYPAL_API_PASSWORD, $PAYPAL_API_SIGNATURE;
require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php';
require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypalfunctions.lib.php';