mirror of
https://github.com/typecho/typecho.git
synced 2025-01-16 20:18:19 +01:00
Fix: fix preg_match parameter#2 $subject is null deprecated issue (#1798)
This commit is contained in:
parent
5783cb0d01
commit
91876b42aa
@ -394,7 +394,8 @@ class GetText
|
||||
} else {
|
||||
$header = $this->getTranslationString(0);
|
||||
}
|
||||
if (preg_match("/plural\-forms: ([^\n]*)\n/i", $header, $regs)) {
|
||||
|
||||
if (!is_null($header) && preg_match("/plural\-forms: ([^\n]*)\n/i", $header, $regs)) {
|
||||
$expr = $regs[1];
|
||||
} else {
|
||||
$expr = "nplurals=2; plural=n == 1 ? 0 : 1;";
|
||||
|
Loading…
x
Reference in New Issue
Block a user