You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While testing domainMOD software (really awesome software by the way!) I came across a bizarre scenario. On my local machine (Mac/MAMP Pro) custom fields were displaying fine (on the main page with domains) but on my hosting (SiteGround/shared hosting) the custom fields did not appear on the main page with domains. After long digging, I found out that the culprit. On my remote hosting (SiteGround) some of the variables from array $_SESSION['s_cdf_data'] became string instead of integer (verified via gettype()). Because of this unintentional type juggling, strict comparison became broken:
} elseif ($field['type_id'] === 5) { // Time Stamp
if ($row->{$field['field']} == '1970-01-01 00:00:00') {
echo'';
} else {
echo$row->{$field['field']};
}
} ?>
I used two workarounds: either coerce $_SESSION into integer via (int) $_SESSION[$variable] or use relaxed comparison (i.e. == instead of ===).
I am not proficient enough in PHP to be able to judge whether this is an isolated case relating purely to my environment or if someone else could encounter the same issue.
The text was updated successfully, but these errors were encountered:
Hmm, that's very strange indeed. I'm going to investigate this further, but in the meantime I've switched the relevant identical operators back to the equals operators so that this functions properly. This has been put into the development code already, and will be getting pushed out in an official release in the next couple weeks.
Since this works in one environment but not the other, I wonder if this is some sort of a PHP setting that's disabled on your shared hosting account. Or a maybe related to a security setting somewhere, since shared hosting tends to be a bit more locked down. Do you happen to know what PHP version your shared hosting runs? And I'm guessing you have no access to your PHP configuration on the shared hosting server, correct?
Do you happen to know what PHP version your shared hosting runs?
I believe it was 7.x. Don't remember sub-version unfortunately. But the major version is 7 for sure.
And I'm guessing you have no access to your PHP configuration on the shared hosting server, correct?
Actually, SiteGround allows to do that. Unfortunately, I am not able to get that information as I am no longer with the company where I was using DomainMOD software.
Those identical operators seem to cause issues way too often. I've gone ahead and changed some of them back to ==, and will investigate changing even more back in the future.
While testing domainMOD software (really awesome software by the way!) I came across a bizarre scenario. On my local machine (Mac/MAMP Pro) custom fields were displaying fine (on the main page with domains) but on my hosting (SiteGround/shared hosting) the custom fields did not appear on the main page with domains. After long digging, I found out that the culprit. On my remote hosting (SiteGround) some of the variables from array
$_SESSION['s_cdf_data']
becamestring
instead ofinteger
(verified viagettype()
). Because of this unintentional type juggling, strict comparison became broken:domainmod/domains/index.php
Lines 2353 to 2359 in c290292
domainmod/domains/index.php
Lines 2469 to 2509 in c290292
I used two workarounds: either coerce $_SESSION into integer via
(int) $_SESSION[$variable]
or use relaxed comparison (i.e.==
instead of===
).I am not proficient enough in PHP to be able to judge whether this is an isolated case relating purely to my environment or if someone else could encounter the same issue.
The text was updated successfully, but these errors were encountered: