Add Exception if MB support is not available in PHP
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3813 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
9
fts.php
9
fts.php
@@ -51,6 +51,15 @@ class fts
|
||||
return $this->regexes;
|
||||
}
|
||||
|
||||
/** The constructor check the availability of the MB module
|
||||
*/
|
||||
public function __construct ()
|
||||
{
|
||||
if (! function_exists ("mb_strlen"))
|
||||
throw new \Exception ("PHP don't have the MB Support. Please add it !",
|
||||
500);
|
||||
}
|
||||
|
||||
/** Search the text provided in $query in the database
|
||||
* @param string $query The text to found in the database
|
||||
* @return array The operator and the associated regex value to search
|
||||
|
||||
Reference in New Issue
Block a user