Hi,
After the migration from 5.0.5 to version 5.3.5, with PHP v5.2.2, everybody had a red message "please contact an administrator" by saving a new ticket or project.
The error in logfile was :
2016-08-03 18:40:32.048 ***** ERROR ***** on file 'D:\www\projeqtor\model\Html2Text.php' at line (243)
2016-08-03 18:40:32.055 ***** ERROR ***** cause = Use of undefined constant PHP_VERSION_ID - assumed 'PHP_VERSION_ID'
I solved the problem by adding code (in red below) in the file Html2Text.php :
public function __construct($html = '', $options = array())
{
// for backwards compatibility
if (!is_array($options)) {
return call_user_func_array(array($this, 'legacyConstruct'), func_get_args());
}
$this->html = $html;
$this->options = array_merge($this->options, $options);
if (!defined('PHP_VERSION_ID')) {
$version = explode('.',PHP_VERSION);
define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2]));
}
$this->htmlFuncFlags = (PHP_VERSION_ID < 50400)
? ENT_COMPAT
: ENT_COMPAT | ENT_HTML5;
}
Is it possible to include this solution or an other in a patch ?
Thanks a lot
After the migration from 5.0.5 to version 5.3.5, with PHP v5.2.2, everybody had a red message "please contact an administrator" by saving a new ticket or project.
The error in logfile was :
2016-08-03 18:40:32.048 ***** ERROR ***** on file 'D:\www\projeqtor\model\Html2Text.php' at line (243)
2016-08-03 18:40:32.055 ***** ERROR ***** cause = Use of undefined constant PHP_VERSION_ID - assumed 'PHP_VERSION_ID'
I solved the problem by adding code (in red below) in the file Html2Text.php :
public function __construct($html = '', $options = array())
{
// for backwards compatibility
if (!is_array($options)) {
return call_user_func_array(array($this, 'legacyConstruct'), func_get_args());
}
$this->html = $html;
$this->options = array_merge($this->options, $options);
if (!defined('PHP_VERSION_ID')) {
$version = explode('.',PHP_VERSION);
define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2]));
}
$this->htmlFuncFlags = (PHP_VERSION_ID < 50400)
? ENT_COMPAT
: ENT_COMPAT | ENT_HTML5;
}
Is it possible to include this solution or an other in a patch ?
Thanks a lot