Code Modernization: Use instanceof instead of a comparison with get_class().

Includes adjusting external libraries which are no longer maintained externally.

Props jrf.
See #50767.

git-svn-id: https://develop.svn.wordpress.org/trunk@49194 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2020-10-18 17:31:37 +00:00
parent 97b2f07d2e
commit 422a9049b5
4 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -1171,7 +1171,7 @@
$this->privErrorReset();
// ----- Look if the $p_archive is a PclZip object
if ((is_object($p_archive)) && (get_class($p_archive) == 'pclzip'))
if (is_object($p_archive) && $p_archive instanceof pclzip)
{
// ----- Duplicate the archive
@@ -1235,7 +1235,7 @@
}
// ----- Look if the $p_archive_to_add is a PclZip object
if ((is_object($p_archive_to_add)) && (get_class($p_archive_to_add) == 'pclzip'))
if (is_object($p_archive_to_add) && $p_archive_to_add instanceof pclzip)
{
// ----- Merge the archive