Page MenuHomeIn-Portal Phabricator

INP-1818 - Reset cURL settings only upon connection closing
ClosedPublic

Authored by alex on Aug 5 2022, 6:28 AM.

Details

Test Plan
  • in IDE:
    • open /index.php file for editing
    • replace $application->Run(); line with the following code:
/** @var kCurlHelper $curl_helper */
$curl_helper = $application->recallObject('CurlHelper');

$curl_helper->followLocation = false;
$curl_helper->Send('http://www.google.com', false);
echo 'Follow Location Enabled: ' . ($curl_helper->followLocation ? 'Y' : 'N') . '<br/>';
$curl_helper->CloseConnection();

$curl_helper->followLocation = true;
$curl_helper->Send('http://www.google.com', false);
echo 'Follow Location Enabled: ' . ($curl_helper->followLocation ? 'Y' : 'N') . '<br/>';
$curl_helper->CloseConnection();
    • save changes
  • in Web Browser:
    • open /index.php
    • confirm, that page output contains this text:
Follow Location Enabled: N
Follow Location Enabled: Y

Diff Detail

Repository
rINP In-Portal
Branch
/in-portal/branches/5.2.x
Lint
Lint ErrorsExcuse: Not fixing, because haven't broken anything.
SeverityLocationCodeMessage
Errorcore/units/helpers/curl_helper.php:572PHPCS.E.CodingStandard.Classes.ClassDeclaration.SpaceBeforeCloseBraceCodingStandard.Classes.ClassDeclaration.SpaceBeforeCloseBrace
Unit
No Unit Test Coverage
Build Status
Buildable 1111
Build 1111: arc lint + arc unit

Event Timeline

alex created this revision.Aug 5 2022, 6:28 AM
alex requested review of this revision.Aug 5 2022, 6:28 AM
alex edited the test plan for this revision. (Show Details)Aug 5 2022, 6:30 AM
alex edited the test plan for this revision. (Show Details)
erik accepted this revision.Aug 9 2022, 5:53 AM
This revision is now accepted and ready to land.Aug 9 2022, 5:53 AM
This revision was landed with ongoing or failed builds.Nov 9 2022, 9:56 AM
This revision was automatically updated to reflect the committed changes.