diff options
author | Ricardo Soares de Lima <ricardo.soaresdelima@gmail.com> | 2012-12-08 17:23:10 -0200 |
---|---|---|
committer | Christian Weiske <cweiske@cweiske.de> | 2013-03-21 06:39:23 +0100 |
commit | 72269aa1d6790b5e9d0643fa348b9c1df6a8cfc7 (patch) | |
tree | 9e62346a0d946cea4562203cf428fa1bcb33e029 /src/SemanticScuttle/Service/Tag.php | |
parent | c4ba9ef2d295f85897557ce1f841a8bb368ed5ee (diff) | |
download | semanticscuttle-72269aa1d6790b5e9d0643fa348b9c1df6a8cfc7.tar.gz semanticscuttle-72269aa1d6790b5e9d0643fa348b9c1df6a8cfc7.tar.bz2 |
Using a foreach loop avoids Notice warnings when the array doesn't have sequential indexes, ex: 0, 1, 3...
Diffstat (limited to 'src/SemanticScuttle/Service/Tag.php')
-rw-r--r-- | src/SemanticScuttle/Service/Tag.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/SemanticScuttle/Service/Tag.php b/src/SemanticScuttle/Service/Tag.php index 39147b8..bd6bf70 100644 --- a/src/SemanticScuttle/Service/Tag.php +++ b/src/SemanticScuttle/Service/Tag.php @@ -144,7 +144,7 @@ class SemanticScuttle_Service_Tag extends SemanticScuttle_DbService $tags = utf8_strtolower(trim($tags)); } else { $tags = array_filter($tags);//remove empty values - for($i=0; $i<count($tags); $i++) { + foreach($tags as $i => $tag) { $tags[$i] = utf8_strtolower(trim($tags[$i])); } } |