mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
worked around stupid php5.2 empty haystack warnings
This commit is contained in:
parent
d1d4e02aad
commit
e11b8e5e32
@ -210,7 +210,7 @@
|
||||
}
|
||||
$Ok = False;
|
||||
$pat = $org_idx;
|
||||
while (!$Ok && ($pat = @strstr($pat,'$')))
|
||||
while (!$Ok && ($pat = strpos($pat,'$') !== false))
|
||||
{
|
||||
$pat = substr($pat,$pat[1] == '{' ? 2 : 1);
|
||||
|
||||
|
@ -769,7 +769,7 @@
|
||||
}
|
||||
else // add the tables array
|
||||
{
|
||||
if (strstr($fnew,'?>')) // remove a closeing tag
|
||||
if (strpos($fnew,'?>') !== false) // remove a closeing tag
|
||||
{
|
||||
$fnew = str_replace('?>','',$fnew);
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ class so_sql
|
||||
{
|
||||
foreach($query as $col => $val)
|
||||
{
|
||||
if (is_int($col) || strstr($join,$col) === false) continue;
|
||||
if (is_int($col) || strpos($join,$col) === false) continue;
|
||||
$query[] = $this->db->expression($this->table_name,$this->table_name.'.',array($col=>$val));
|
||||
unset($query[$col]);
|
||||
}
|
||||
|
@ -972,7 +972,7 @@
|
||||
{
|
||||
if (($keys['name'] != $last['name'] || // write only newest version
|
||||
$keys['template'] != $last['template']) &&
|
||||
!strstr($keys['name'],'test'))
|
||||
strpos($keys['name'],'test') === false)
|
||||
{
|
||||
$tpl->read($keys);
|
||||
$to_trans += $tpl->getToTranslate();
|
||||
@ -1340,7 +1340,7 @@
|
||||
foreach($strings as $str)
|
||||
{
|
||||
if (strlen($str) > 1 && $str{0} != '@' && $str{0} != '$' &&
|
||||
strstr($str,'$row') === false && strstr($str,'$cont') === false)
|
||||
strpos($str,'$row') === false && strpos($str,'$cont') === false)
|
||||
{
|
||||
$to_trans[trim(strtolower($str))] = $str;
|
||||
}
|
||||
|
@ -89,13 +89,13 @@
|
||||
$tab_widget =& new etemplate('etemplate.tab_widget');
|
||||
$tab_widget->no_onclick = true;
|
||||
|
||||
if ($value && !strstr($value,'.'))
|
||||
if ($value && strpos($value,'.') === false)
|
||||
{
|
||||
$value = $tmpl->name . '.' . $value;
|
||||
}
|
||||
foreach($names as $k => $name)
|
||||
{
|
||||
if (!strstr($name,'.'))
|
||||
if (strpos($name,'.') === false)
|
||||
{
|
||||
$name = $names[$k] = $tmpl->name . '.' . $name;
|
||||
}
|
||||
@ -112,7 +112,7 @@
|
||||
|
||||
foreach($names as $k => $name)
|
||||
{
|
||||
if (!strstr($name,'.'))
|
||||
if (strpos($name,'.') === false)
|
||||
{
|
||||
$name = $names[$k] = $tmpl->name . '.' . $name;
|
||||
}
|
||||
|
@ -304,8 +304,8 @@
|
||||
|
||||
if($this->data_type != 'node')
|
||||
{
|
||||
$found_at = strstr($this->data,'PHP_SERIALIZED_OBJECT&:');
|
||||
if($found_at != False)
|
||||
$found_at = strpos($this->data,'PHP_SERIALIZED_OBJECT&:');
|
||||
if($found_at !== False)
|
||||
{
|
||||
return unserialize(str_replace ('PHP_SERIALIZED_OBJECT&:', '', $this->data));
|
||||
}
|
||||
@ -359,8 +359,8 @@
|
||||
$retval['attributes'] = $this->attributes;
|
||||
if($this->data_type != 'node')
|
||||
{
|
||||
$found_at = strstr($this->data,'PHP_SERIALIZED_OBJECT&:');
|
||||
if($found_at != False)
|
||||
$found_at = strpos($this->data,'PHP_SERIALIZED_OBJECT&:');
|
||||
if($found_at !== False)
|
||||
{
|
||||
$retval['value'] = unserialize(str_replace ('PHP_SERIALIZED_OBJECT&:', '', $this->data));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user