aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2013-07-02 12:16:29 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2013-07-15 08:27:17 +0200
commit9c1bef6f963d2fb8430b2302afc60630201ecc9a (patch)
treecad08f143ef6f41afc82c55fcc4f9046f08c44ab
parent2430b1676a87898abe74f6614a9a837ee96acfc6 (diff)
downloadUstring-9c1bef6f963d2fb8430b2302afc60630201ecc9a.zip
Ustring-9c1bef6f963d2fb8430b2302afc60630201ecc9a.tar.gz
Ustring-9c1bef6f963d2fb8430b2302afc60630201ecc9a.tar.bz2
Force the compareTo() method to compare strings.
-rw-r--r--String.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/String.php b/String.php
index 09daaf9..3a0c222 100644
--- a/String.php
+++ b/String.php
@@ -248,7 +248,7 @@ class String implements \ArrayAccess, \Countable, \IteratorAggregate {
*/
public function compareTo ( $string ) {
- return strcmp($this->_string, $string);
+ return strcmp($this->_string, $string . '');
}
/**