|
|
| |
1. A typo in the code? |
|
Reply |
|
|
 jv | 2012-10-08 23:57:36 |
Great class! This is exactly what I need for my project.
I was just wondering though, if there's a typo in the function set_symbols? To me it seems like it sets the variable $conjunctions instead of $symbols.
So this:
public function set_symbols($arr){
if(!is_array($arr))
{
$this->conjunctions = array(mb_strtolower($arr));
}
else
{
$new = array();
foreach($arr as $val)
{
$new[] = mb_strtolower($val);
}
$this->conjunctions = $new;
}
}
should perhaps be changed to this:
public function set_symbols($arr){
if(!is_array($arr))
{
$this->symbols = array(mb_strtolower($arr));
}
else
{
$new = array();
foreach($arr as $val)
{
$new[] = mb_strtolower($val);
}
$this->symbols = $new;
}
} |
| |
2. Re: A typo in the code? |
|
Reply |
|
|
 Arturs Sosins | 2012-10-09 11:00:05 - In reply to message 1 from jv |
Yes, you are completely right. I've checked the revision and bug was introduced when I updated the class to use multi byte functions, probably due to copying.
Thank you for stating this, I've updated submitted class. ;) |
|