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
So, additionally, if making an object from the file fails, don't do anything.
If a group does not exist, then it matters not if a string node exists. Testing for a string is probably not what we want to verify anyway. The file is out of compliance with the expected schema.
If group does exist, then we can make the next test to see if there is a name. Otherwise, $content->group[0] is null and calling attributes() on null returns a Fatal Error.
Might want to wrap this in a try/catch block.
Also, it seems to me that only group[0] is processed. That might comply with Language version 1.0 schema, but not with Language version 2.0 schema.
The text was updated successfully, but these errors were encountered:
In
Language->cloneModuleLanguage()
, PHP'ssimplexml_load_file()
could return a false or something that looks like false.Suggest:
So, additionally, if making an object from the file fails, don't do anything.
If a
group
does not exist, then it matters not if astring
node exists. Testing for astring
is probably not what we want to verify anyway. The file is out of compliance with the expected schema.If
group
does exist, then we can make the next test to see if there is a name. Otherwise,$content->group[0]
isnull
and callingattributes()
onnull
returns a Fatal Error.Might want to wrap this in a try/catch block.
Also, it seems to me that only
group[0]
is processed. That might comply with Language version 1.0 schema, but not with Language version 2.0 schema.The text was updated successfully, but these errors were encountered: