Constant __START__ not found
29 <td colspan="3"></td>
30 <td id="info">
31 <p>
32 Page generated in <strong><?php echo round(microtime(true) - __START__, 5) ?></strong> second(s).33 Number of queries executed: <strong><?php echo (int)Flux::$numberOfQueries ?></strong>.
34 <?php if (Flux::config('GzipCompressOutput')): ?>Gzip Compression: <strong>Enabled</strong>.<?php endif ?>
35 </p>
Constant __START__ not found
9 <?php endif ?>
10 <?php if (Flux::config('ShowRenderDetails')): ?>
11
12 Page generated in <strong><?php echo round(microtime(true) - __START__, 5) ?></strong> second(s). 13 Number of queries executed: <strong><?php echo (int)Flux::$numberOfQueries ?></strong>.
14 <?php if (Flux::config('GzipCompressOutput')): ?>Gzip Compression: <strong>Enabled</strong>.<?php endif ?>
15
Constant FLUX_ROOT not found
22 * @return int GIT hash
23 */
24function git_hash() {
25 $file = FLUX_ROOT.'/.git/refs/heads/master';26 if (file_exists($file) && is_readable($file)) {
27 $lines = implode('', file($file, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES));
28 if(isset($lines)) {
Constant FLUX_ROOT not found
6 */
7function getReposVersion()
8{
9 $gitDir = FLUX_ROOT.'/.git';10
11 if(is_dir($gitDir)) {
12 return git_hash();
Constant FLUX_ROOT not found
591 }
592 } elseif (!file_exists($chk)) {
593 foreach (Flux::$addons as $_tmpAddon_key => $_tmpAddon) {
594 $chk = FLUX_ROOT .'/'. FLUX_ADDON_DIR .'/'. $_tmpAddon_key .'/'. preg_replace('/^('.$base.')/', '', $uri ); 595 if (file_exists($chk)) {
596 $path = sprintf('%s/%s/%s', FLUX_ADDON_DIR, $_tmpAddon_key, preg_replace('/^('.$base.')/', '', $uri ));
597 $uri = $path;
Constant FLUX_ROOT not found
584 // If file not found, search in parent's template.
585 if (!file_exists($chk) && !empty($this->parentTemplate)) {
586 $path = $this->parentTemplate->themePath($path, $included);
587 $chk = FLUX_ROOT .'/'. preg_replace('/^('.$base.')/', '', $path ); 588
589 if (file_exists($chk)) {
590 $uri = $path;
Constant FLUX_ROOT not found
579 // normalized basePath.
580 $base = preg_replace('/(\/+)$/', '', $this->basePath ) . '/';
581 $base = preg_quote( $base, '/' );
582 $chk = FLUX_ROOT .'/'. preg_replace('/^('.$base.')/', '', $uri ); 583
584 // If file not found, search in parent's template.
585 if (!file_exists($chk) && !empty($this->parentTemplate)) {
Constant FLUX_ROOT not found
374
375 include $this->actionPath;
376
377 $pageMenuFile = FLUX_ROOT."/modules/{$this->moduleName}/pagemenu/{$this->actionName}.php"; 378 $pageMenuItems = array();
379
380 // Get the main menu file first (located in the actual module).
Description
The constant being accessed is not defined, which can result in a runtime warning on PHP < 8.0 and a fatal error on PHP >= 8.0.
Bad practice
$test = SOME_CONSTANT;
// invalid: constant "SOME_CONSTANT" is undefined
echo $test;
Recommended
Either define the constant, or remove the usage if it is not required:
define("SOME_CONSTANT", "Some value");
$test = SOME_CONSTANT;
echo $test;