View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Support us on Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - Problem with 5.3.5 : Impossible to save a new ticket or project - ProjeQtOr
 
 

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

More
04 Aug 2016 11:39 #1 by ProjMD
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
The following user(s) said Thank You: babynus

Please Log in or Create an account to join the conversation.

More
04 Aug 2016 14:30 #2 by babynus
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.

Babynus
Administrator of ProjeQtOr web site

Please Log in or Create an account to join the conversation.

More
04 Aug 2016 15:40 #3 by ProjMD
Thank you for the patch.
I have to specify that I found the solution here : php.net/manual/fr/function.phpversion.php

Please Log in or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.042 seconds

Cookies settings

×

Functional Cookies

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Please login to see yours activities!

Other cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.