Suppress warning when sorting tags/heads (caused by lazy load of data)
Suppress warning when sorting tags/heads (caused by lazy load of data)

--- a/include/git/headlist/HeadListLoad_Raw.class.php
+++ b/include/git/headlist/HeadListLoad_Raw.class.php
@@ -42,7 +42,7 @@
 
 		/* TODO add different orders */
 		if ($order == '-committerdate') {
-			usort($heads, array('GitPHP_Head', 'CompareAge'));
+			@usort($heads, array('GitPHP_Head', 'CompareAge'));
 		}
 
 		if ((($count > 0) && (count($heads) > $count)) || ($skip > 0)) {

--- a/include/git/taglist/TagListLoad_Raw.class.php
+++ b/include/git/taglist/TagListLoad_Raw.class.php
@@ -40,7 +40,7 @@
 
 		/* TODO add different orders */
 		if ($order == '-creatordate') {
-			usort($tags, array('GitPHP_Tag', 'CompareCreationEpoch'));
+			@usort($tags, array('GitPHP_Tag', 'CompareCreationEpoch'));
 		}
 
 		if ((($count > 0) && (count($tags) > $count)) || ($skip > 0)) {

comments