Page MenuHomeIn-Portal Phabricator
  • Changed Files
  • branches/5.2.x/core/kernel/utility/logger.php

INP-1779 - Throw an exception, when SQL error is detected in CLI
ClosedPublic

Authored by alex on Jan 24 2020, 3:02 AM.

Details

Test Plan
  1. open /tools/run_event.php file in IDE
  2. comment out exit_code(1, 'This script needs to be enabled manually !'); line (if not already)
  3. after $application->Init(); line add $application->Conn->Query('SELECT * FROM ' . TABLE_PREFIX . 'NonExistingTable'); exit;
  4. save changes
  5. in CLI run php tools/run_event.php u:OnRefreshForm b674006f3edb1d9cd4d838c150b0567d command
  6. confirm, that before patch is applied the SQL error isn't displayed
  7. confirm, that after patch is applied the exception is thrown & shown when SQL error is detected

Diff Detail

Repository
rINP In-Portal
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

alex created this revision.Jan 24 2020, 3:02 AM
alex requested review of this revision.Jan 24 2020, 3:02 AM
alex added a project: Restricted Project.Jan 24 2020, 3:02 AM
erik accepted this revision.Mar 9 2020, 5:43 AM

Tested, accepted.

In the run_event. php first line must be commented to make test plan possible.

exit_code(1, 'This script needs to be enabled manually !');

This revision is now accepted and ready to land.Mar 9 2020, 5:43 AM
alex edited the test plan for this revision. (Show Details)Mar 9 2020, 6:59 AM
In D377#7476, @erik wrote:

Tested, accepted.

In the run_event. php first line must be commented to make test plan possible.

exit_code(1, 'This script needs to be enabled manually !');

Thanks, I've updated test plan to include your suggestion.

This revision was automatically updated to reflect the committed changes.