mirror of
https://github.com/YahnisElsts/plugin-update-checker.git
synced 2025-10-04 02:02:05 +08:00
Fix PHP 8.4 deprecation errors
Remove type declarations for parameters that are nullable to get rid of deprecation errors in a backwards compatible way.
This commit is contained in:
parent
73e6281e43
commit
46ee454f68
3 changed files with 4 additions and 4 deletions
|
@ -77,7 +77,7 @@ if ( !class_exists(StateStore::class, false) ):
|
||||||
* @param Update|null $update
|
* @param Update|null $update
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public function setUpdate(Update $update = null) {
|
public function setUpdate($update = null) {
|
||||||
$this->lazyLoad();
|
$this->lazyLoad();
|
||||||
$this->update = $update;
|
$this->update = $update;
|
||||||
return $this;
|
return $this;
|
||||||
|
|
|
@ -459,7 +459,7 @@ if ( !class_exists(UpdateChecker::class, false) ):
|
||||||
*
|
*
|
||||||
* @param Metadata|null $update
|
* @param Metadata|null $update
|
||||||
*/
|
*/
|
||||||
protected function fixSupportedWordpressVersion(Metadata $update = null) {
|
protected function fixSupportedWordpressVersion($update = null) {
|
||||||
if ( !isset($update->tested) || !preg_match('/^\d++\.\d++$/', $update->tested) ) {
|
if ( !isset($update->tested) || !preg_match('/^\d++\.\d++$/', $update->tested) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
4
vendor/ParsedownModern.php
vendored
4
vendor/ParsedownModern.php
vendored
|
@ -648,7 +648,7 @@ class Parsedown
|
||||||
#
|
#
|
||||||
# Setext
|
# Setext
|
||||||
|
|
||||||
protected function blockSetextHeader($Line, array $Block = null)
|
protected function blockSetextHeader($Line, $Block = null)
|
||||||
{
|
{
|
||||||
if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted']))
|
if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted']))
|
||||||
{
|
{
|
||||||
|
@ -786,7 +786,7 @@ class Parsedown
|
||||||
#
|
#
|
||||||
# Table
|
# Table
|
||||||
|
|
||||||
protected function blockTable($Line, array $Block = null)
|
protected function blockTable($Line, $Block = null)
|
||||||
{
|
{
|
||||||
if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted']))
|
if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted']))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue