[TikiWiki-commits] [Git][tikiwiki/tiki][master] [ENH] Usage of DB related constants are now ensured they exist before usage
"SoftStart Code \(@softstartcode\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <68bf5be432ebd_2c1f656c01553b@gitlab-sidekiq-low-urgency-cpu-bound-v2-7d554c449-hqc8d.mail> |
SoftStart Code pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
8f493981 by Micael José de Sousa Farinha at 2025-09-08T22:34:40+00:00
[ENH] Usage of DB related constants are now ensured they exist before usage
---
* [FIX] ConsoleApplicationBuilder: Update database checks to ensure constants are defined before usage
* [FIX] ConsoleApplicationBuilder: Ensure DB_RUNNING constant is defined before checking its value
* [ENH] Usage of DB related constants are now ensured they exist before usage
See merge request tikiwiki/tiki!5509
- - - - -
1 changed file:
- lib/core/Tiki/Command/ConsoleApplicationBuilder.php
Changes:
=====================================
lib/core/Tiki/Command/ConsoleApplicationBuilder.php
=====================================
@@ -371,7 +371,7 @@ class ConsoleApplicationBuilder
*/
protected function checkIsDbRunning(): void
{
- if (! DB_RUNNING) {
+ if (! defined('DB_RUNNING') || ! DB_RUNNING) {
throw new UnavailableException(
'Your database must be running and have valid credentials in the local.php file. See http://doc.tiki.org/Installation for more information.',
UnavailableException::CHECK_RUNNING
@@ -389,7 +389,7 @@ class ConsoleApplicationBuilder
{
// we want to provide the right feedback, so lets check pre-requirements first.
$this->checkIsDbRunning();
- if (! DB_STATUS) {
+ if (! defined('DB_STATUS') || ! DB_STATUS) {
throw new UnavailableException(
'Cannot initiate Database. Probably because the database needs updating.',
UnavailableException::CHECK_INSTALLED
@@ -407,7 +407,7 @@ class ConsoleApplicationBuilder
protected function checkTikiSetupComplete(): void
{
$this->checkIsDatabaseInstalled();
- if (! DB_TIKI_SETUP) {
+ if (! defined('DB_TIKI_SETUP') || ! DB_TIKI_SETUP) {
throw new UnavailableException(
'Database errors prevented tiki-setup from completing. Try running php console.php database:update',
UnavailableException::CHECK_TIKI_SETUP
@@ -427,7 +427,7 @@ class ConsoleApplicationBuilder
// we want to provide the right feedback, so lets check pre-requirements first.
$this->checkTikiSetupComplete();
- if (! DB_SYNCHRONAL) {
+ if (! defined('DB_SYNCHRONAL') || ! DB_SYNCHRONAL) {
throw new UnavailableException(
'The database needs to be updated. Solved by: php console.php database:update',
UnavailableException::CHECK_UPDATED
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/8f4939818997956ce6eb97a55b3016ad3dfe25fc
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/8f4939818997956ce6eb97a55b3016ad3dfe25fc
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs