Forum

Problem with 5.3.5 ...
 
Notifications
Clear all

Problem with 5.3.5 : Impossible to save a new ticket or project

3 Posts
2 Users
0 Reactions
2,696 Views
(@projmd)
Posts: 2
New Member
Topic starter
 
[#3562]

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:wwwprojeqtormodelHtml2Text.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


 
Posted : 04 Aug 2016 13H39
(@babynus)
Posts: 14952
Member Admin
 

Hi,

Thanks for reporting the issue and proposing a patch.
Your solution has been included for patch V5.4.4, but most generalized : directly in projeqtor.php so that it will work even in other files.


 
Posted : 04 Aug 2016 16H30
(@projmd)
Posts: 2
New Member
Topic starter
 

Thank you for the patch.
I have to specify that I found the solution here : http://php.net/manual/fr/function.phpversion.php


 
Posted : 04 Aug 2016 17H40
Share:

Scroll to Top