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

@ -106,7 +106,8 @@ if ($tagnew = $tagform->get_data()) {
unset($tagnew->rawname);
} else { // They might be trying to change the rawname, make sure it's a change that doesn't affect name
$tagnew->name = array_shift(tag_normalize($tagnew->rawname, TAG_CASE_LOWER));
$norm = tag_normalize($tagnew->rawname, TAG_CASE_LOWER);
$tagnew->name = array_shift($norm);
if ($tag->name != $tagnew->name) { // The name has changed, let's make sure it's not another existing tag
if (tag_get_id($tagnew->name)) { // Something exists already, so flag an error