Ticket #430 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

QInstalationValidator small fix - skipping non-existing database connections

Reported by: dmarkic Owned by:
Priority: minor Milestone: 1.1.2
Component: Framework Version: 1.1 Development
Keywords: QInstalationValidator Cc:

Description

On line 142 of QInstalationValidtor you do: $db = QApplication::$Database[$i];

Without checking if this connection is defined or not. I suggest you add a line before that:

if (!isset(QApplication::$Database[$i]))

continue;

I have some databases defined, but not in correct order, (eg, 2 and 6), so this fails with fatal error on line 148 with $db->Connect as $db is not an object.

I've attached the patch.

Attachments

QInstallationValidator.class.php.patch Download (0.5 KB) - added by dmarkic 3 years ago.
Patch for QInstalationValidator against 1.1.1 distribution.

Change History

Changed 3 years ago by dmarkic

Patch for QInstalationValidator against 1.1.1 distribution.

Changed 3 years ago by VexedPanda

  • status changed from new to in_QA

Looks safe to me. Check it in. :)

Changed 3 years ago by alex94040

  • milestone changed from 2.0 to 1.1.2

This should be included in 1.1.2 release. Thanks for your contribution, dmarkic!

Changed 3 years ago by alex94040

  • summary changed from QInstalationValidator small fix to QInstalationValidator small fix - skipping non-existing database connections

Changed 3 years ago by alex94040

  • status changed from in_QA to closed
  • resolution set to fixed

(In [781]) Fixes #430 (QInstalationValidator small fix - skipping non-existing database connections). Code by dmarkic, reviewed by alex94040. This checkin is for 1.1 branch.

Changed 3 years ago by alex94040

(In [782]) Fixes #430 (QInstalationValidator small fix - skipping non-existing database connections). Code by dmarkic, reviewed by alex94040. This checkin is for 2.0 branch.

Note: See TracTickets for help on using tickets.