Opened 6 years ago

Closed 6 years ago

#2084 closed defect (fixed)

Code Uses PHP 5.4 Features

Reported by: reto.kohli Owned by: comvation
Priority: must Milestone: Contrexx 3.1 Hotfix 1
Component: Core Version: 3.1
Severity: critical Keywords: php version
Cc:

Description (last modified by michael.ritter)

The following code in core/language.class.php, from line 1076 on:

$link = '\http://' . \Env::get('config')\['domainUrl'\] . ASCMS_PATH_OFFSET . '/' . $alias->getSlug(); $this->strErrMessage =

\Env::get('lang')\['TXT_CORE_REMOVE_ALIAS_TO_ACTIVATE_LANGUAGE'\] . ':<br /> <a href="index.php?cmd=alias&act=modify&id=' . $id . '" target="_blank">' . $link . '</a>';

Do not work on servers with PHP 5.3 installed.

Fixing it to work with PHP 5.3 is easily done:

$config = \Env::get('config'); $domainUrl = $config\['domainUrl'\]; $link = 'http://' . $domainUrl . ASCMS_PATH_OFFSET . '/' . $alias->getSlug(); $lang = \Env::get('lang'); $text = $lang\['TXT_CORE_REMOVE_ALIAS_TO_ACTIVATE_LANGUAGE'\]; $this->strErrMessage =

$text . ':<br /> <a href="index.php?cmd=alias&act=modify&id=' . $id . '" target="_blank">' . $link . '</a>';

Other files should be tested for such problems as well!The following code in core/language.class.php, from line 1076 on:

$link = 'http://' . \Env::get('config')\['domainUrl'\] . ASCMS_PATH_OFFSET . '/' . $alias-

Change History (2)

comment:1 Changed 6 years ago by michael.ritter

  • Description modified (diff)

comment:2 Changed 6 years ago by michael.ritter

  • Description modified (diff)
  • Milestone changed from unknown to Contrexx 3.1 Hotfix 1
  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.