aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2013-07-15 08:24:14 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2013-07-15 08:27:17 +0200
commit95e8c647e34c0230692eebb25992c700184e6f93 (patch)
tree79ab3631ebe2df4510873716973baf5d7493046e
parentc6b0c9f794dc53732ea1095f9284c73c955040a1 (diff)
downloadUstring-95e8c647e34c0230692eebb25992c700184e6f93.zip
Ustring-95e8c647e34c0230692eebb25992c700184e6f93.tar.gz
Ustring-95e8c647e34c0230692eebb25992c700184e6f93.tar.bz2
Force $x and $y to be strings.
-rw-r--r--Search.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/Search.php b/Search.php
index 4eab9d1..df64542 100644
--- a/Search.php
+++ b/Search.php
@@ -60,6 +60,8 @@ class Search {
*/
public static function approximated ( $y, $x, $k ) {
+ $x = (string) $x;
+ $y = (string) $y;
$m = strlen($x);
$n = strlen($y);
$offset = array();