Skip to content

Commit cb24641

Browse files
adg-wanduchriskacerguis
authored andcommitted
Bug fix: Load config before call it
1 parent 3944355 commit cb24641

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/RestController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,15 +258,15 @@ public function __construct($config = 'rest')
258258
// when output is displayed for not damaging data accidentally
259259
$this->output->parse_exec_vars = false;
260260

261+
// Load the rest.php configuration file
262+
$this->get_local_config($config);
263+
261264
// Log the loading time to the log table
262265
if ($this->config->item('rest_enable_logging') === true) {
263266
// Start the timer for how long the request takes
264267
$this->_start_rtime = microtime(true);
265268
}
266269

267-
// Load the rest.php configuration file
268-
$this->get_local_config($config);
269-
270270
// Determine supported output formats from configuration
271271
$supported_formats = $this->config->item('rest_supported_formats');
272272

0 commit comments

Comments
 (0)