fix: PHP Notice: Undefined variable: oEmail

This commit is contained in:
RainLoop Team 2014-01-15 13:12:00 +04:00
parent 8c0276631b
commit 3d2e7968d4

View file

@ -292,13 +292,13 @@ class Contact
{
foreach($oVCard->URL as $oUrl)
{
$oTypes = $oEmail ? $oEmail['TYPE'] : null;
$oTypes = $oUrl ? $oUrl['TYPE'] : null;
$sUrl = $oTypes ? \trim((string) $oUrl) : '';
if ($oTypes && 0 < \strlen($sUrl))
{
$oProp = new Property($oTypes->has('WORK') ? PropertyType::WEB_PAGE_BUSSINES : PropertyType::WEB_PAGE_PERSONAL, $sEmail);
\array_push($aProperties, $oProp);
\array_push($aProperties,
new Property($oTypes->has('WORK') ? PropertyType::WEB_PAGE_BUSSINES : PropertyType::WEB_PAGE_PERSONAL, $sUrl));
}
}
}