Skip to content

Commit

Permalink
Merge pull request #9498 from kaltura/fix-php-errors-11
Browse files Browse the repository at this point in the history
Fixes the below erros
  • Loading branch information
Jess Portnoy committed Jun 17, 2020
2 parents e3e1a9f + 9417be2 commit 37878f1
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion alpha/apps/kaltura/lib/media/myFlvHandler.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ public static function fixFlvTimestamps($srcName, $outName)
case myFlvHandler::TAG_TYPE_METADATA:
break;
default:
continue;
break;
}
if ($size == self::TAG_WRAPPER_SIZE){ // dont write tag with no actual data
continue;
Expand Down
4 changes: 2 additions & 2 deletions alpha/apps/kaltura/lib/monitor/KalturaMonitorClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ protected static function getRangeLength($size)
return null; // ignore multibyte range

$end = $size - 1;
if ($range{0} == '-')
if ($range[0] == '-')
{
// The n-number of the last bytes is requested
$start = $size - substr($range, 1);
Expand Down Expand Up @@ -454,4 +454,4 @@ public static function monitorRabbitAccess($dataSource, $queryType, $queryTook,
self::writeDeferredEvent($data);
}

}
}
4 changes: 2 additions & 2 deletions alpha/apps/kaltura/lib/request/infraRequestUtils.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static function handleRangeRequest($full_content_length, $set_content_len
// If the range starts with an '-' we start from the beginning
// If not, we forward the file pointer
// And make sure to get the end byte if spesified
if ($range{0} == '-')
if ($range[0] == '-')
{
// The n-number of the last bytes is requested
$c_start = $size - substr($range, 1);
Expand Down Expand Up @@ -475,7 +475,7 @@ public static function getRequestParams()
{
$key = each($pathParts);
$value = each($pathParts);
if (!array_key_exists($key['value'], $params))
if (is_array($key) && !array_key_exists($key['value'], $params))
{
$params[$key['value']] = $value['value'];
}
Expand Down
4 changes: 2 additions & 2 deletions alpha/apps/kaltura/lib/request/kIpAddressUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public static function parseIpRange($range)
$d = strpos($range, self::IP_ADDRESS_RANGE_CHAR);
$fromIp = ip2long(substr($range, 0, $d));
$toIp = ip2long(substr($range, $d + 1));
continue;
break;

case self::IP_ADDRESS_TYPE_MASK_ADDRESS:
list (, $rangeMask) = array_map('trim', explode(self::IP_ADDRESS_MASK_CHAR, $range));
Expand Down Expand Up @@ -313,4 +313,4 @@ public static function traverseIpTree($ip, $ipTree)
return $values;
}

}
}
2 changes: 1 addition & 1 deletion infra/cdl/kdl/KDLFlavor.php
Original file line number Diff line number Diff line change
Expand Up @@ -1968,7 +1968,7 @@ private static function checkBlackList($blackList, $transcoder, $mediaSet)
$sourcePart = $mediaSet->_audio;
break;
default:
continue;
break;
}
if($sourcePart && is_array($subBlackList)
&& (in_array($sourcePart->_id, $subBlackList)
Expand Down
2 changes: 1 addition & 1 deletion infra/cdl/kdl/KDLOperatorBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function checkBlackList($blackList, $mediaSet, array &$errors=null, array
$sourcePart = $mediaSet->_audio;
break;
default:
continue;
break;
}
if($sourcePart && is_array($subBlackList)
&& (in_array($sourcePart->_id, $subBlackList)
Expand Down
2 changes: 1 addition & 1 deletion infra/media/mediaInfoParser/KFFMpegMediaParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ protected function parseStreams($streams, KalturaMediaInfo $mediaInfo)
if(in_array($stream->codec_name, array('mjpeg','png'))
&& (in_array($mediaInfo->containerFormat, array('mp3','mpeg audio','isom','mp4','mpeg4','mpeg-4','m4a'))
|| in_array($mediaInfo->containerId, array('mp3','mpeg audio','isom','mp4','mpeg4','mpeg-4','m4a'))) ){
continue;
break;
}
$this->parseVideoStream($stream, $mAux);
if($vidCnt==0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1583,7 +1583,7 @@ public static function onEntryChanged(entry $entry, array $modifiedColumns)
case EntryDistributionStatus::REMOVED:

KalturaLog::log("Entry distribution [" . $entryDistribution->getId() . "] status [" . $entryDistribution->getStatus() . "] no update required");
continue;
break;

case EntryDistributionStatus::PENDING:
case EntryDistributionStatus::ERROR_SUBMITTING:
Expand Down Expand Up @@ -1623,19 +1623,19 @@ public static function onEntryChanged(entry $entry, array $modifiedColumns)
if(!$distributionProvider)
{
KalturaLog::err("Entry distribution [" . $entryDistribution->getId() . "] provider [" . $distributionProfile->getProviderType() . "] not found");
continue;
break;
}

if(!$distributionProvider->isUpdateEnabled())
{
KalturaLog::log("Entry distribution [" . $entryDistribution->getId() . "] provider [" . $distributionProvider->getName() . "] does not support update");
continue;
break;
}

if($distributionProfile->getUpdateEnabled() == DistributionProfileActionStatus::DISABLED)
{
KalturaLog::log("Entry distribution [" . $entryDistribution->getId() . "] profile id [" . $distributionProfile->getId() . "] update not enabled");
continue;
break;
}

$updateRequiredEntryFields = $distributionProvider->getUpdateRequiredEntryFields($distributionProfileId);
Expand Down Expand Up @@ -1682,15 +1682,15 @@ public static function onEntryChanged(entry $entry, array $modifiedColumns)
if(!$updateRequired)
{
KalturaLog::log("Entry distribution [" . $entryDistribution->getId() . "] update not required");
continue;
break;
}

if($distributionProfile->getUpdateEnabled() != DistributionProfileActionStatus::AUTOMATIC)
{
KalturaLog::log("Entry distribution [" . $entryDistribution->getId() . "] should not be updated automatically");
$entryDistribution->setDirtyStatus(EntryDistributionDirtyStatus::UPDATE_REQUIRED);
$entryDistribution->save();
continue;
break;
}

KalturaLog::log("Updating entry distribution [" . $entryDistribution->getId() . "]");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ protected function handleDurationType($fieldValue)
break;
default:
KalturaLog::debug("Undefined duration type {$durationType}.");
continue;
break;
}

$item->setRange($range);
Expand Down
4 changes: 2 additions & 2 deletions vendor/ZendFramework/library/Zend/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ public function addElements(array $elements)
} else {
switch ($argc) {
case 0:
continue;
break;
case (1 <= $argc):
$type = array_shift($spec);
case (2 <= $argc):
Expand Down Expand Up @@ -1520,7 +1520,7 @@ public function addSubForms(array $subForms)
$order = null;
switch ($argc) {
case 0:
continue;
break;
case (1 <= $argc):
$subForm = array_shift($spec);
case (2 <= $argc):
Expand Down
4 changes: 3 additions & 1 deletion vendor/ZendFramework/library/Zend/View/Helper/HeadLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,9 @@ public function createDataStylesheet(array $args)

if(0 < count($args) && is_array($args[0])) {
$extras = array_shift($args);
$extras = (array) $extras;
if (isset($extras)){
$extras = (array) $extras;
}
}

$attributes = compact('rel', 'type', 'href', 'media', 'conditionalStylesheet', 'extras');
Expand Down
4 changes: 2 additions & 2 deletions vendor/propel/util/BasePeer.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,10 @@ public static function doUpdate(Criteria $selectCriteria, Criteria $updateValues
$rawcvt = '';
// parse the $params['raw'] for ? chars
for($r=0,$len=strlen($raw); $r < $len; $r++) {
if ($raw{$r} == '?') {
if ($raw[$r] == '?') {
$rawcvt .= ':p'.$p++;
} else {
$rawcvt .= $raw{$r};
$rawcvt .= $raw[$r];
}
}
$sql .= $rawcvt . ', ';
Expand Down

0 comments on commit 37878f1

Please sign in to comment.