Hi,
I'm coding new functionnalities on Projeqtor as part of my traineeship. I created a new class with an attribute with a decimal type. I wish to keep the attribute to NULL when getting the objects from the db with getSqlElementsFromCriteria(...), but the function set my attribute from NULL to 0 on the line 2362.
I do not understand the condition nor the comment, could you explain it to me ? Here is the condition:
It wont be possible now to keep numeric value to zero.
It is due to major change on PHP 7.1.
Before PHP 7.1 : $a=1; $b=null; $c=$a+$b; // leads to $c=1
After PHP 7.1 : $a=1; $b=null; $c=$a+$b; // leads to error
So we had to manage numeric values to never be null, and replace them with 0 when read from db or from input.
(we could not get through the whole code to parse every sting used in arythmetic operation)
But I agree that it may be disapointing as Null value (no data entered) is not exactly the same as zero value (a zéro is amnually entered)
Sadly i don't have a server with PHP 7.1 (i work with wamp) so i can't test it on Projeqtor.
You can easily have several versions of PHP on Wamp : wampserver.aviatechno.net/
(I have 5 on my dev one)
Try with ProjeQtOr V6.3.7 : you'll have the issues
Well, i dug deeper into the problem and reproduced the error on PHP 7.1 (I commented the lines to set the attribute to 0 when it's null in SqlElement.php).
En poursuivant votre navigation, vous acceptez le dépôt de cookies tiers destinés au bon fonctionnement et à la sécurisation du site (gestion de session, reCaptcha) et à une analyse statistique anonymisée des accès sur notre site (Google Analytics). Si vous vous inscrivez, les informations que vous fournirez ne seront jamais divulguées à un tiers sous quelque forme que ce soit. En savoir plus
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.