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
There are a few cases where empty() is used to check sdesc (short description) and ldesc (long description) values. We need to verify if these checks are appropriate, considering that empty() checks for both unset and falsey values (including empty strings and "0").
Objective
Review the current usage of empty() for sdesc and ldesc, and determine if more precise string comparisons can be used.
Affected Files and Lines
At the moment of writing, there are at least three occurrences:
This is a follow up to a comment in #154
Background
There are a few cases where
empty()
is used to checksdesc
(short description) andldesc
(long description) values. We need to verify if these checks are appropriate, considering thatempty()
checks for both unset and falsey values (including empty strings and "0").Objective
Review the current usage of
empty()
forsdesc
andldesc
, and determine if more precise string comparisons can be used.Affected Files and Lines
At the moment of writing, there are at least three occurrences:
phd/phpdotnet/phd/Index.php
Line 360 in 417b066
phd/phpdotnet/phd/Index.php
Line 372 in 417b066
phd/phpdotnet/phd/Package/PEAR/Web.php
Line 77 in 417b066
Tasks
Verify the current behavior:
sdesc
andldesc
are initialized and used in the codebase.Based on findings, decide on the appropriate action:
empty()
is the correct check, document why it's appropriate in these cases.$var === ""
for strict empty string checks).Ensure consistency across the codebase in how these variables are handled.
References
Feel free to provide updates and seek clarification if needed during the investigation and implementation process.
The text was updated successfully, but these errors were encountered: