Commit c397556
committed
fix: use database version for update migrations and always reset maintenance mode
setVersion() was called with System::getVersion() (the installed code
version, e.g. 4.1.0) instead of the database version (e.g. 4.0.18).
This caused version_compare('4.1.0', '4.1.0-alpha', '<') to return
false, skipping all 4.1 database migrations and leaving the version
number unchanged at 4.0.18.
Additionally, maintenance mode is now reset to false in all error paths
and the catch block handles both phpMyFAQ\Core\Exception and \Exception,
preventing admin lockout when the database update fails.1 parent c2ddbf4 commit c397556
2 files changed
Lines changed: 8 additions & 4 deletions
File tree
- phpmyfaq/src/phpMyFAQ
- Controller/Administration/Api
- Setup
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
256 | 257 | | |
257 | | - | |
| 258 | + | |
| 259 | + | |
258 | 260 | | |
259 | 261 | | |
260 | 262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
223 | 224 | | |
224 | 225 | | |
225 | | - | |
| 226 | + | |
226 | 227 | | |
227 | 228 | | |
| 229 | + | |
228 | 230 | | |
229 | 231 | | |
230 | 232 | | |
| |||
0 commit comments