mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-25 04:11:49 +02:00
fix for a PHP Warning: preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: nothing to repeat at offset 14 in
phpgwapi/inc/class.egw_index.inc.php on line 183 not sure why it occurs, but the fix works around it and seems not to break anything
This commit is contained in:
parent
49897197c0
commit
832d65ab70
@ -180,7 +180,9 @@ class egw_index implements IteratorAggregate
|
|||||||
$keywords = array();
|
$keywords = array();
|
||||||
foreach($fields as $field)
|
foreach($fields as $field)
|
||||||
{
|
{
|
||||||
foreach(preg_split(self::SEPERATORS,$field) as $keyword)
|
$tmpArray = @preg_split(self::SEPERATORS,$field);
|
||||||
|
if (is_array($tmpArray)) {
|
||||||
|
foreach($tmpArray as $keyword)
|
||||||
{
|
{
|
||||||
if (!in_array($keyword,$keywords) && strlen($keyword) >= self::MIN_KEYWORD_LEN && !is_numeric($keyword))
|
if (!in_array($keyword,$keywords) && strlen($keyword) >= self::MIN_KEYWORD_LEN && !is_numeric($keyword))
|
||||||
{
|
{
|
||||||
@ -188,6 +190,7 @@ class egw_index implements IteratorAggregate
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// delete evtl. existing current keywords
|
// delete evtl. existing current keywords
|
||||||
self::delete($app,$id);
|
self::delete($app,$id);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user