Forum

Problem with 5.3.5 ...
 
Notifications
Retirer tout

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

3 Posts
2 Utilisateurs
0 Reactions
2,695 Vu
(@projmd)
Posts: 2
New Member
Début du sujet
 
[#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


 
Posté : 4 Août PM 13:088
(@babynus)
Posts: 14952
Membre 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.


 
Posté : 4 Août PM 16:088
(@projmd)
Posts: 2
New Member
Début du sujet
 

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


 
Posté : 4 Août PM 17:088
Share:
Retour en haut