Skip to content

Commit 805c010

Browse files
committed
PHPCompat: remove PHP4-style constructor
PHP 4-style constructors where the constructor function name mirrors the class name have been deprecated since PHP 7.0 and support has been removed since PHP 8.0, which means they are now silently ignored. Considering the constructor is empty and is overloading an equally [empty constructor in the `WP_Importer` class](https://developer.wordpress.org/reference/classes/wp_importer/), I'm fixing this by removing the method. This should not be considered a BC-break as calling the constructor directly on an instantiated object was never the intention of the code anyway and instantiating the object via `new WP_Categories_to_Tags()` will now fall through to the parent constructor, which equally does nothing anyway. Refs: * https://wiki.php.net/rfc/remove_php4_constructors
1 parent 3cad83c commit 805c010

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

wpcat2tag-importer.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,6 @@ function init() {
475475

476476
$this->footer();
477477
}
478-
479-
function WP_Categories_to_Tags() { /* Do nothing. */ }
480478
}
481479

482480
$wp_cat2tag_importer = new WP_Categories_to_Tags();

0 commit comments

Comments
 (0)