Feature: Support php7.4 (#1354)
* Run CI tests against php 7.4 * Sort composer dependencies * Remove unused Aws S3 php library * Pin simplepie dependency to ^1.5 * Pin getid3 dependency to ^1.9 * Pin composer semver to ^3.2 * Pin php-amqplib to ^2.12 * Drop sentry logging support * Update composer dependencies * Move propel regenerate to Makefile * Regenerate propel files with v1.7.0 * Pin propel orm to ^1.7 * Regenerate propel files with v1.7.2 * fix: generator_version in airtime-conf-production.php * Replace propel/propel1 with jooola/propel1 * Regenerate propel files with v1.7.3-dev * Fix php7.4 compatibility Using php-cs-fixer: '@PhpCsFixer' => true, 'concat_space' => ['spacing' => 'one'], 'ordered_class_elements' => false, 'yoda_style' => false, '@PHP74Migration' => true, 'assign_null_coalescing_to_coalesce_equal' => false, 'ternary_to_null_coalescing' => false, 'heredoc_indentation' => false, '@PHP74Migration:risky' => true, 'declare_strict_types' => false, 'void_return' => false, 'use_arrow_functions' => false, * Fix pre-commit
This commit is contained in:
parent
30b3470a06
commit
5e8d8db6e9
90 changed files with 887 additions and 1310 deletions
|
@ -47,7 +47,7 @@ class Application_Model_Webstream implements Application_Model_LibraryEditable
|
|||
$dateString = $this->webstream->getDbLength();
|
||||
$arr = explode(':', $dateString);
|
||||
if (count($arr) == 3) {
|
||||
list($hours, $min, $sec) = $arr;
|
||||
[$hours, $min, $sec] = $arr;
|
||||
$di = new DateInterval("PT{$hours}H{$min}M{$sec}S");
|
||||
|
||||
return $di->format('%Hh %Im');
|
||||
|
@ -183,14 +183,14 @@ class Application_Model_Webstream implements Application_Model_LibraryEditable
|
|||
$valid['url'][1] = _('URL should be 512 characters or less');
|
||||
} else {
|
||||
try {
|
||||
list($mime, $content_length_found) = self::discoverStreamMime($url);
|
||||
[$mime, $content_length_found] = self::discoverStreamMime($url);
|
||||
if (is_null($mime)) {
|
||||
throw new Exception(_('No MIME type found for webstream.'));
|
||||
}
|
||||
$mediaUrl = self::getMediaUrl($url, $mime, $content_length_found);
|
||||
|
||||
if (preg_match('/(x-mpegurl)|(xspf\+xml)|(pls\+xml)|(x-scpls)/', $mime)) {
|
||||
list($mime, $content_length_found) = self::discoverStreamMime($mediaUrl);
|
||||
[$mime, $content_length_found] = self::discoverStreamMime($mediaUrl);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
$valid['url'][0] = false;
|
||||
|
@ -384,7 +384,7 @@ class Application_Model_Webstream implements Application_Model_LibraryEditable
|
|||
$headers = self::cleanHeaders($headers);
|
||||
foreach ($headers as $h) {
|
||||
if (preg_match('/^content-type:/i', $h)) {
|
||||
list(, $value) = explode(':', $h, 2);
|
||||
[, $value] = explode(':', $h, 2);
|
||||
$mime = trim($value);
|
||||
}
|
||||
if (preg_match('/^content-length:/i', $h)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue