SimpleXML objects being returned from Config.php, not strings #413
Labels
enhancement
good first issue
Issues that require "minimal" knowledge of the codebase
hackathon
Issues that could be solved within a day
There is potential for confusion or error (largely created by me) in that this statement and other function returns from the Config class -
gocdb/lib/Gocdb_Services/Config.php
Line 541 in f94e980
When $bannerText is subsequently returned from the function, it actually returns a SimpleXMLElement object and not a string. Subsequent use of the returned object usually works in context, due to implicit casting to a string, but it can behave unexpectedly e.g. '==' comparison between two such returned values from different elements will fail even when the string values are the same.
It would be safer if all returns from Config.php were explicitly cast to strings or other type as and where appropriate.
The text was updated successfully, but these errors were encountered: