Skip to content

Conversation

@MEXAHOTABOP
Copy link

Commits that made plugin work on dfwk.ru

…s array offset on value of type null \n Color.php: PHP Warning: Invalid argument supplied for foreach() on example, fix localization and extention.json
@lethosor
Copy link
Member

Is this still compatible with 1.32? Or was the old version compatible with 1.33?

I did look into upgrading to 1.33 briefly, and I could have sworn our extensions ran on it unmodified...

@MEXAHOTABOP
Copy link
Author

I guess this loader may work with any version starting from 1.29 (minimal version for manifest v2), version 1.33 was taken from manifest example, but i`m think i did not use any keywords that really depends on 1.33.

Actually in this case i dont even check this, target was bring wiki and plugins to current LTS 1.35 and made them available via new loader, to unify wiki plugin loading process without modification in nixos mediawiki service to make easier future support.

This pull requst should not bring any functional changes, so you can ignore him if you dont need it.

@@ -1,275 +1,272 @@
<?php

$DFCharacters = array(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, is there a requirement to move these into classes now, or is that just a stylistic preference?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I encounter problem that cause null pointer error when access this array, i`m not php programmer so just move them in class where they will be guaranteed in function scope.

Copy link
Author

@MEXAHOTABOP MEXAHOTABOP Jul 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error was mentioned in commit message
Avoid using globals to fix: Color.php: PHP Notice: Trying to access array offset on value of type null \n Color.php: PHP Warning: Invalid argument supplied for foreach() on example

This may or may be not related to php74

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, yeah, could be related to a PHP upgrade or MW invoking code at a different time.

Current option code not compatible with mw 1.40
$user->getOption been removed in favor userOptionsLookup->getOption
Need a bit more digging for proper solution, but shall work for now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants