-
-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecated message in SMW 4.1.2 #5542
Comments
see also #5539 |
This affects https://repair.wiki/w/Repair_Wiki |
For someone who want to fix str_replace message oneself, adding if condition on line 120 works for me. foreach ( $args as $key => $value ) {
# add from here
if ( $value == null) {
$value = '';
}
# to here
$complied = str_replace( [ '{{' . $key . '}}', '{{#' . $key . '}}' ], $value, $complied );
} |
In a modern php that can be written as Also, it's better to report one warning per issue. |
For me the first one (Passing null to parameter) happens when running updateEntityCollation.php MW 1.39.6, SMW 4.1.2
|
I think this one was fixed here #5528 |
True, moving from 4.1.2 to latest master, the warning goes away |
Configuration:
MediaWiki | 1.39.4
PHP | 8.1.23 (fpm-fcgi)
MariaDB | 11.1.2-MariaDB
ICU | 73.2
LilyPond | 2.22.2
Elasticsearch | 7.10.2
Discovered messages so far:
Deprecated: str_replace(): Passing null to parameter
#2($replace)
of type array|string is deprecated in .../SemanticMediaWiki/src/Utils/TemplateEngine.php on line 120 appeared after install of SMW 4.1.2.Deprecated: SMW\MediaWiki\Content\SchemaContent overrides fillParserOutput which was deprecated in MediaWiki 1.38. [Called from MediaWiki\Content\Renderer\ContentRenderer::getParserOutput in .../includes/content/Renderer/ContentRenderer.php at line 47] in .../includes/debug/MWDebug.php on line 381
Deprecated: Use of AbstractContent::getParserOutput was deprecated in MediaWiki 1.38. [Called from ContentHandler::callDeprecatedContentGPO in .../includes/content/ContentHandler.php at line 1883] in .../includes/debug/MWDebug.php on line 381
PHP Deprecated: Implicit conversion from float 34.5 to int loses precision in .../SemanticMediaWiki/src/Utils/CliMsgFormatter.php on line 425
The text was updated successfully, but these errors were encountered: