mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 16:32:45 +00:00
Remove lc_first function since PHP 5.2 is no longer supported
This commit is contained in:
parent
dc4a25c8cf
commit
3d967f9f2c
@ -105,7 +105,7 @@ if (isset($_GET['from'])) {
|
|||||||
$info = $page->type_info($_GET['from']);
|
$info = $page->type_info($_GET['from']);
|
||||||
if ($info['type'] !== null) {
|
if ($info['type'] !== null) {
|
||||||
$from_title = $info['title'];
|
$from_title = $info['title'];
|
||||||
$from = Page::lc_first($from_title);
|
$from = lcfirst($from_title);
|
||||||
$from_href = $page->link($info['page']);
|
$from_href = $page->link($info['page']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
10
inc/page.php
10
inc/page.php
@ -662,16 +662,6 @@ class Page {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* lcfirst is only supported in PHP >= 5.3
|
|
||||||
* @param $str
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
static function lc_first($str) {
|
|
||||||
$str[0] = strtolower($str[0]);
|
|
||||||
return (string)$str;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $where
|
* @param $where
|
||||||
* @return string
|
* @return string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user