Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F58303443
brokenLangs.php
mszabo (Máté Szabó)
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
•
mszabo
Jan 28 2025, 10:17 PM
2025-01-28 22:17:36 (UTC+0)
Size
817 B
Referenced Files
None
Subscribers
None
brokenLangs.php
View Options
<?php
require_once
__DIR__
.
'/Maintenance.php'
;
class
BrokenLangs
extends
Maintenance
{
public
function
execute
()
{
$languageFactory
=
$this
->
getServiceContainer
()->
getLanguageFactory
();
$opts
=
ArrayUtils
::
cartesianProduct
(
[
'time'
,
'date'
,
'monthonly'
,
'both'
,
'pretty'
],
[
'mdy'
,
'dmy'
,
'ymd'
,
'ISO 8601'
,
'default'
]
);
$count
=
0
;
foreach
(
array_keys
(
MediaWiki\Languages\Data\Names
::
NAMES
)
as
$code
)
{
$lang
=
$languageFactory
->
getLanguage
(
$code
);
foreach
(
$opts
as
[
$type
,
$pref
]
)
{
$str
=
$lang
->
getDateFormatString
(
$type
,
$pref
);
if
(
$str
===
null
)
{
$this
->
output
(
"$code: $type $pref is broken
\n
"
);
$count
++;
}
}
}
$this
->
output
(
"Total broken: $count
\n
"
);
}
}
$maintClass
=
BrokenLangs
::
class
;
require
RUN_MAINTENANCE_IF_MAIN
;
File Metadata
Details
Attached
Mime Type
text/x-php
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
19193953
Default Alt Text
brokenLangs.php (817 B)
Attached To
Mode
T384963: PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated
Attached
Detach File
Event Timeline
Log In to Comment