MDL-34873 fix multiple E_STRICT tag related problems

This commit is contained in:
Petr Škoda 2012-08-19 10:17:12 +02:00
parent c92d6f417c
commit 7c2cc9c85e
4 changed files with 9 additions and 4 deletions

View file

@ -558,7 +558,8 @@ function tag_get_related_tags_csv($related_tags, $html=TAG_RETURN_HTML) {
function tag_rename($tagid, $newrawname) {
global $DB;
if (! $newrawname_clean = array_shift(tag_normalize($newrawname, TAG_CASE_ORIGINAL)) ) {
$norm = tag_normalize($newrawname, TAG_CASE_ORIGINAL);
if (! $newrawname_clean = array_shift($norm) ) {
return false;
}
@ -1020,7 +1021,8 @@ function tag_cron() {
function tag_find_tags($text, $ordered=true, $limitfrom='', $limitnum='') {
global $DB;
$text = array_shift(tag_normalize($text, TAG_CASE_LOWER));
$norm = tag_normalize($text, TAG_CASE_LOWER);
$text = array_shift($norm);
if ($ordered) {
$query = "SELECT tg.id, tg.name, tg.rawname, COUNT(ti.id) AS count