Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
4c4b7a80
Commit
4c4b7a80
authored
Oct 17, 2016
by
Carsten Rose
Browse files
Store.php: Check if important config.ini vars exist.
parent
332a8033
Changes
2
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/Constants.php
View file @
4c4b7a80
...
...
@@ -150,6 +150,7 @@ const ERROR_MISSING_TABLE = 1065;
const
ERROR_RECORD_NOT_FOUND
=
1066
;
const
ERROR_INVALID_EDITOR_PROPERTY_NAME
=
1067
;
const
ERROR_UNKNOWN_ESCAPE_MODE
=
1068
;
const
ERROR_MISSING_CONFIG_INI_VALUE
=
1069
;
// Subrecord
...
...
extension/qfq/qfq/store/Store.php
View file @
4c4b7a80
...
...
@@ -220,6 +220,13 @@ class Store {
$config
[
SYSTEM_SQL_LOG
]
=
$config
[
SYSTEM_PATH_EXT
]
.
'/'
.
$config
[
SYSTEM_SQL_LOG
];
}
// Verify existence
$names
=
array
(
'DB_USER'
,
'DB_SERVER'
,
'DB_PASSWORD'
,
'DB_NAME'
,
'SQL_LOG'
,
'SQL_LOG_MODE'
);
foreach
(
$names
as
$name
)
{
if
(
!
isset
(
$config
[
$name
]))
{
throw
new
qfq\UserFormException
(
"Missing configuration in `config.ini`:
$name
"
,
ERROR_MISSING_CONFIG_INI_VALUE
);
}
}
self
::
setVarArray
(
$config
,
STORE_SYSTEM
,
true
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment