update composer libs and add ramsey/uuid
This commit is contained in:
30
vendor/simplepie/simplepie/.travis.yml
vendored
30
vendor/simplepie/simplepie/.travis.yml
vendored
@@ -1,21 +1,17 @@
|
||||
sudo: false
|
||||
language: php
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- php: 5.4
|
||||
- php: 5.5
|
||||
- php: 5.6
|
||||
- php: 7.0
|
||||
- php: 7.1
|
||||
- php: hhvm
|
||||
sudo: true
|
||||
dist: trusty
|
||||
group: edge # until the next Travis CI update
|
||||
allow_failures:
|
||||
- php: hhvm
|
||||
- php: 7.0
|
||||
- php: 7.1
|
||||
|
||||
php:
|
||||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
- 7.2
|
||||
|
||||
before_script:
|
||||
- travis_retry composer install --no-interaction
|
||||
|
||||
script:
|
||||
- composer test
|
||||
|
||||
branches:
|
||||
except:
|
||||
- one-dot-two
|
||||
|
||||
19
vendor/simplepie/simplepie/composer.json
vendored
19
vendor/simplepie/simplepie/composer.json
vendored
@@ -24,17 +24,30 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
"php": ">=5.6.0",
|
||||
"ext-pcre": "*",
|
||||
"ext-xml": "*",
|
||||
"ext-xmlreader": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~4 || ~5"
|
||||
"phpunit/phpunit": "~5.4.3 || ~6.5"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-curl": "",
|
||||
"ext-iconv": "",
|
||||
"ext-intl": "",
|
||||
"ext-mbstring": "",
|
||||
"mf2/mf2": "Microformat module that allows for parsing HTML for microformats"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"SimplePie": "library"
|
||||
}
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
"bin-dir": "bin"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "phpunit"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -306,20 +306,20 @@ class idna_convert
|
||||
if ($this->_strict_mode) {
|
||||
$this->_error('Neither email addresses nor URLs are allowed in strict mode.');
|
||||
return false;
|
||||
} else {
|
||||
// Skip first char
|
||||
if ($k) {
|
||||
$encoded = '';
|
||||
$encoded = $this->_encode(array_slice($decoded, $last_begin, (($k)-$last_begin)));
|
||||
if ($encoded) {
|
||||
$output .= $encoded;
|
||||
} else {
|
||||
$output .= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($k)-$last_begin)));
|
||||
}
|
||||
$output .= chr($decoded[$k]);
|
||||
}
|
||||
$last_begin = $k + 1;
|
||||
}
|
||||
|
||||
// Skip first char
|
||||
if ($k) {
|
||||
$encoded = '';
|
||||
$encoded = $this->_encode(array_slice($decoded, $last_begin, (($k)-$last_begin)));
|
||||
if ($encoded) {
|
||||
$output .= $encoded;
|
||||
} else {
|
||||
$output .= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($k)-$last_begin)));
|
||||
}
|
||||
$output .= chr($decoded[$k]);
|
||||
}
|
||||
$last_begin = $k + 1;
|
||||
}
|
||||
}
|
||||
// Catch the rest of the string
|
||||
@@ -333,13 +333,13 @@ class idna_convert
|
||||
$output .= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($inp_len)-$last_begin)));
|
||||
}
|
||||
return $output;
|
||||
} else {
|
||||
if ($output = $this->_encode($decoded)) {
|
||||
return $output;
|
||||
} else {
|
||||
return $this->_ucs4_to_utf8($decoded);
|
||||
}
|
||||
}
|
||||
|
||||
if ($output = $this->_encode($decoded)) {
|
||||
return $output;
|
||||
}
|
||||
|
||||
return $this->_ucs4_to_utf8($decoded);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
168
vendor/simplepie/simplepie/library/SimplePie.php
vendored
168
vendor/simplepie/simplepie/library/SimplePie.php
vendored
@@ -33,7 +33,7 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* @package SimplePie
|
||||
* @version 1.5.1
|
||||
* @version 1.5.2
|
||||
* @copyright 2004-2017 Ryan Parman, Geoffrey Sneddon, Ryan McCue
|
||||
* @author Ryan Parman
|
||||
* @author Geoffrey Sneddon
|
||||
@@ -50,7 +50,7 @@ define('SIMPLEPIE_NAME', 'SimplePie');
|
||||
/**
|
||||
* SimplePie Version
|
||||
*/
|
||||
define('SIMPLEPIE_VERSION', '1.5.1');
|
||||
define('SIMPLEPIE_VERSION', '1.5.2');
|
||||
|
||||
/**
|
||||
* SimplePie Build
|
||||
@@ -648,7 +648,7 @@ class SimplePie
|
||||
* @access private
|
||||
*/
|
||||
public $enable_exceptions = false;
|
||||
|
||||
|
||||
/**
|
||||
* The SimplePie class contains feed level data and options
|
||||
*
|
||||
@@ -1387,7 +1387,7 @@ class SimplePie
|
||||
|
||||
list($headers, $sniffed) = $fetched;
|
||||
}
|
||||
|
||||
|
||||
// Empty response check
|
||||
if(empty($this->raw_data)){
|
||||
$this->error = "A feed could not be found at `$this->feed_url`. Empty body.";
|
||||
@@ -1471,7 +1471,7 @@ class SimplePie
|
||||
// Cache the file if caching is enabled
|
||||
if ($cache && !$cache->save($this))
|
||||
{
|
||||
trigger_error("$this->cache_location is not writeable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.", E_USER_WARNING);
|
||||
trigger_error("$this->cache_location is not writable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.", E_USER_WARNING);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -1640,7 +1640,7 @@ class SimplePie
|
||||
if (!$this->force_feed)
|
||||
{
|
||||
// Check if the supplied URL is a feed, if it isn't, look for it.
|
||||
$locate = $this->registry->create('Locator', array(&$file, $this->timeout, $this->useragent, $this->max_checked_feeds));
|
||||
$locate = $this->registry->create('Locator', array(&$file, $this->timeout, $this->useragent, $this->max_checked_feeds, $this->force_fsockopen, $this->curl_options));
|
||||
|
||||
if (!$locate->is_feed($file))
|
||||
{
|
||||
@@ -1708,7 +1708,7 @@ class SimplePie
|
||||
$this->data = array('url' => $this->feed_url, 'feed_url' => $file->url, 'build' => SIMPLEPIE_BUILD);
|
||||
if (!$cache->save($this))
|
||||
{
|
||||
trigger_error("$this->cache_location is not writeable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.", E_USER_WARNING);
|
||||
trigger_error("$this->cache_location is not writable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.", E_USER_WARNING);
|
||||
}
|
||||
$cache = $this->registry->call('Cache', 'get_handler', array($this->cache_location, call_user_func($this->cache_name_function, $file->url), 'spc'));
|
||||
}
|
||||
@@ -1904,7 +1904,7 @@ class SimplePie
|
||||
|
||||
/**
|
||||
* Get the URL for the feed
|
||||
*
|
||||
*
|
||||
* When the 'permanent' mode is enabled, returns the original feed URL,
|
||||
* except in the case of an `HTTP 301 Moved Permanently` status response,
|
||||
* in which case the location of the first redirection is returned.
|
||||
@@ -2138,10 +2138,8 @@ class SimplePie
|
||||
{
|
||||
return $this->get_link();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->subscribe_url();
|
||||
}
|
||||
|
||||
return $this->subscribe_url();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2211,10 +2209,8 @@ class SimplePie
|
||||
{
|
||||
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2231,10 +2227,8 @@ class SimplePie
|
||||
{
|
||||
return $categories[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2296,10 +2290,8 @@ class SimplePie
|
||||
{
|
||||
return array_unique($categories);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2316,10 +2308,8 @@ class SimplePie
|
||||
{
|
||||
return $authors[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2394,10 +2384,8 @@ class SimplePie
|
||||
{
|
||||
return array_unique($authors);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2414,10 +2402,8 @@ class SimplePie
|
||||
{
|
||||
return $contributors[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2480,10 +2466,8 @@ class SimplePie
|
||||
{
|
||||
return array_unique($contributors);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2501,10 +2485,8 @@ class SimplePie
|
||||
{
|
||||
return $links[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2606,10 +2588,8 @@ class SimplePie
|
||||
{
|
||||
return $this->data['links'][$rel];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function get_all_discovered_feeds()
|
||||
@@ -2664,10 +2644,8 @@ class SimplePie
|
||||
{
|
||||
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0]));
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2700,10 +2678,8 @@ class SimplePie
|
||||
{
|
||||
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2744,10 +2720,8 @@ class SimplePie
|
||||
{
|
||||
return $this->sanitize($this->data['headers']['content-language'], SIMPLEPIE_CONSTRUCT_TEXT);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2773,10 +2747,8 @@ class SimplePie
|
||||
{
|
||||
return (float) $match[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2805,10 +2777,8 @@ class SimplePie
|
||||
{
|
||||
return (float) $match[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2842,10 +2812,8 @@ class SimplePie
|
||||
{
|
||||
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2885,10 +2853,8 @@ class SimplePie
|
||||
{
|
||||
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0]));
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -2917,10 +2883,8 @@ class SimplePie
|
||||
{
|
||||
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0]));
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2943,10 +2907,8 @@ class SimplePie
|
||||
{
|
||||
return 88.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2969,10 +2931,8 @@ class SimplePie
|
||||
{
|
||||
return 31.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2992,10 +2952,8 @@ class SimplePie
|
||||
{
|
||||
return $qty;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ($qty > $max) ? $max : $qty;
|
||||
}
|
||||
|
||||
return ($qty > $max) ? $max : $qty;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3017,10 +2975,8 @@ class SimplePie
|
||||
{
|
||||
return $items[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3115,10 +3071,8 @@ class SimplePie
|
||||
{
|
||||
return array_slice($items, $start);
|
||||
}
|
||||
else
|
||||
{
|
||||
return array_slice($items, $start, $end);
|
||||
}
|
||||
|
||||
return array_slice($items, $start, $end);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3241,16 +3195,12 @@ class SimplePie
|
||||
{
|
||||
return array_slice($items, $start);
|
||||
}
|
||||
else
|
||||
{
|
||||
return array_slice($items, $start, $end);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error('Cannot merge zero SimplePie objects', E_USER_WARNING);
|
||||
return array();
|
||||
|
||||
return array_slice($items, $start, $end);
|
||||
}
|
||||
|
||||
trigger_error('Cannot merge zero SimplePie objects', E_USER_WARNING);
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -113,10 +113,8 @@ class SimplePie_Author
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -130,10 +128,8 @@ class SimplePie_Author
|
||||
{
|
||||
return $this->link;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -147,10 +143,7 @@ class SimplePie_Author
|
||||
{
|
||||
return $this->email;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ class SimplePie_Cache_MySQL extends SimplePie_Cache_DB
|
||||
'cache_purge_time' => 2592000
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
$this->options = SimplePie_Misc::array_merge_recursive($this->options, SimplePie_Cache::parse_URL($location));
|
||||
|
||||
// Path is prefixed with a "/"
|
||||
@@ -395,10 +395,8 @@ class SimplePie_Cache_MySQL extends SimplePie_Cache_DB
|
||||
{
|
||||
return $time;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -416,14 +414,8 @@ class SimplePie_Cache_MySQL extends SimplePie_Cache_DB
|
||||
$query = $this->mysql->prepare('UPDATE `' . $this->options['extras']['prefix'] . 'cache_data` SET `mtime` = :time WHERE `id` = :id');
|
||||
$query->bindValue(':time', time());
|
||||
$query->bindValue(':id', $this->id);
|
||||
if ($query->execute() && $query->rowCount() > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return $query->execute() && $query->rowCount() > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -442,13 +434,7 @@ class SimplePie_Cache_MySQL extends SimplePie_Cache_DB
|
||||
$query->bindValue(':id', $this->id);
|
||||
$query2 = $this->mysql->prepare('DELETE FROM `' . $this->options['extras']['prefix'] . 'items` WHERE `feed_id` = :id');
|
||||
$query2->bindValue(':id', $this->id);
|
||||
if ($query->execute() && $query2->execute())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return $query->execute() && $query2->execute();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,6 +65,12 @@ class SimplePie_Cache_Redis implements SimplePie_Cache_Base {
|
||||
$parsed = SimplePie_Cache::parse_URL($location);
|
||||
$redis = new Redis();
|
||||
$redis->connect($parsed['host'], $parsed['port']);
|
||||
if (isset($parsed['pass'])) {
|
||||
$redis->auth($parsed['pass']);
|
||||
}
|
||||
if (isset($parsed['path'])) {
|
||||
$redis->select((int)substr($parsed['path'], 1));
|
||||
}
|
||||
$this->cache = $redis;
|
||||
|
||||
if (!is_null($options) && is_array($options)) {
|
||||
|
||||
@@ -131,10 +131,8 @@ class SimplePie_Caption
|
||||
{
|
||||
return $this->endTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -149,10 +147,8 @@ class SimplePie_Caption
|
||||
{
|
||||
return $this->lang;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -166,10 +162,8 @@ class SimplePie_Caption
|
||||
{
|
||||
return $this->startTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -183,10 +177,8 @@ class SimplePie_Caption
|
||||
{
|
||||
return $this->text;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -200,10 +192,7 @@ class SimplePie_Caption
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -120,24 +120,18 @@ class SimplePie_Content_Type_Sniffer
|
||||
{
|
||||
return $return;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $official;
|
||||
}
|
||||
|
||||
return $official;
|
||||
}
|
||||
elseif ($official === 'text/html')
|
||||
{
|
||||
return $this->feed_or_html();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $official;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->unknown();
|
||||
|
||||
return $official;
|
||||
}
|
||||
|
||||
return $this->unknown();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -158,10 +152,8 @@ class SimplePie_Content_Type_Sniffer
|
||||
{
|
||||
return 'application/octect-stream';
|
||||
}
|
||||
else
|
||||
{
|
||||
return 'text/plain';
|
||||
}
|
||||
|
||||
return 'text/plain';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -207,10 +199,8 @@ class SimplePie_Content_Type_Sniffer
|
||||
{
|
||||
return 'image/vnd.microsoft.icon';
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->text_or_binary();
|
||||
}
|
||||
|
||||
return $this->text_or_binary();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -241,10 +231,8 @@ class SimplePie_Content_Type_Sniffer
|
||||
{
|
||||
return 'image/vnd.microsoft.icon';
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -328,4 +316,3 @@ class SimplePie_Content_Type_Sniffer
|
||||
return 'text/html';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -103,10 +103,8 @@ class SimplePie_Copyright
|
||||
{
|
||||
return $this->url;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -120,10 +118,7 @@ class SimplePie_Copyright
|
||||
{
|
||||
return $this->label;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -112,10 +112,8 @@ class SimplePie_Credit
|
||||
{
|
||||
return $this->role;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -129,10 +127,8 @@ class SimplePie_Credit
|
||||
{
|
||||
return $this->scheme;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -146,10 +142,7 @@ class SimplePie_Credit
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -117,10 +117,8 @@ class SimplePie_Decode_HTML_Entities
|
||||
$this->consumed .= $this->data[$this->position];
|
||||
return $this->data[$this->position++];
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -139,10 +137,8 @@ class SimplePie_Decode_HTML_Entities
|
||||
$this->position += $len;
|
||||
return $data;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -612,4 +608,3 @@ class SimplePie_Decode_HTML_Entities
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -282,10 +282,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->bitrate;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -301,10 +299,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $captions[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -318,10 +314,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->captions;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -337,10 +331,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $categories[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -354,10 +346,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->categories;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -371,10 +361,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->channels;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -388,10 +376,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->copyright;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -407,10 +393,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $credits[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -424,10 +408,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->credits;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -441,10 +423,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -462,15 +442,11 @@ class SimplePie_Enclosure
|
||||
$time = SimplePie_Misc::time_hms($this->duration);
|
||||
return $time;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->duration;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
|
||||
return $this->duration;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -484,10 +460,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->expression;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 'full';
|
||||
}
|
||||
|
||||
return 'full';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -519,10 +493,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->framerate;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -549,10 +521,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $hashes[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -566,10 +536,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->hashes;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -583,10 +551,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->height;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -601,10 +567,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->lang;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -620,10 +584,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $keywords[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -637,10 +599,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->keywords;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -654,10 +614,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->length;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -671,10 +629,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return urldecode($this->link);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -689,10 +645,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->medium;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -707,10 +661,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->player;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -726,10 +678,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $ratings[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -743,10 +693,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->ratings;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -762,10 +710,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $restrictions[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -779,10 +725,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->restrictions;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -796,10 +740,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->samplingrate;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -814,10 +756,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return round($length/1048576, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -833,10 +773,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $thumbnails[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -850,10 +788,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->thumbnails;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -867,10 +803,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -885,10 +819,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -902,10 +834,8 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return $this->width;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1365,15 +1295,10 @@ class SimplePie_Enclosure
|
||||
{
|
||||
return 'mp3';
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return $type;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
return $type;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ class SimplePie_File
|
||||
{
|
||||
$idn = new idna_convert();
|
||||
$parsed = SimplePie_Misc::parse_url($url);
|
||||
$url = SimplePie_Misc::compress_parse_url($parsed['scheme'], $idn->encode($parsed['authority']), $parsed['path'], $parsed['query'], $parsed['fragment']);
|
||||
$url = SimplePie_Misc::compress_parse_url($parsed['scheme'], $idn->encode($parsed['authority']), $parsed['path'], $parsed['query'], NULL);
|
||||
}
|
||||
$this->url = $url;
|
||||
$this->permanent_url = $url;
|
||||
|
||||
@@ -155,15 +155,13 @@ class SimplePie_HTTP_Parser
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->http_version = '';
|
||||
$this->status_code = '';
|
||||
$this->reason = '';
|
||||
$this->headers = array();
|
||||
$this->body = '';
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->http_version = '';
|
||||
$this->status_code = '';
|
||||
$this->reason = '';
|
||||
$this->headers = array();
|
||||
$this->body = '';
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
155
vendor/simplepie/simplepie/library/SimplePie/IRI.php
vendored
155
vendor/simplepie/simplepie/library/SimplePie/IRI.php
vendored
@@ -211,10 +211,8 @@ class SimplePie_IRI
|
||||
{
|
||||
return $this->normalization[$this->scheme][$name];
|
||||
}
|
||||
else
|
||||
{
|
||||
return $return;
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -225,14 +223,7 @@ class SimplePie_IRI
|
||||
*/
|
||||
public function __isset($name)
|
||||
{
|
||||
if (method_exists($this, 'get_' . $name) || isset($this->$name))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return method_exists($this, 'get_' . $name) || isset($this->$name);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -356,10 +347,8 @@ class SimplePie_IRI
|
||||
$target->scheme_normalization();
|
||||
return $target;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,11 +385,9 @@ class SimplePie_IRI
|
||||
}
|
||||
return $match;
|
||||
}
|
||||
else
|
||||
{
|
||||
// This can occur when a paragraph is accidentally parsed as a URI
|
||||
return false;
|
||||
}
|
||||
|
||||
// This can occur when a paragraph is accidentally parsed as a URI
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -804,7 +791,7 @@ class SimplePie_IRI
|
||||
public function set_iri($iri, $clear_cache = false)
|
||||
{
|
||||
static $cache;
|
||||
if ($clear_cache)
|
||||
if ($clear_cache)
|
||||
{
|
||||
$cache = null;
|
||||
return;
|
||||
@@ -830,30 +817,28 @@ class SimplePie_IRI
|
||||
$return) = $cache[$iri];
|
||||
return $return;
|
||||
}
|
||||
else
|
||||
|
||||
$parsed = $this->parse_iri((string) $iri);
|
||||
if (!$parsed)
|
||||
{
|
||||
$parsed = $this->parse_iri((string) $iri);
|
||||
if (!$parsed)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$return = $this->set_scheme($parsed['scheme'])
|
||||
&& $this->set_authority($parsed['authority'])
|
||||
&& $this->set_path($parsed['path'])
|
||||
&& $this->set_query($parsed['query'])
|
||||
&& $this->set_fragment($parsed['fragment']);
|
||||
|
||||
$cache[$iri] = array($this->scheme,
|
||||
$this->iuserinfo,
|
||||
$this->ihost,
|
||||
$this->port,
|
||||
$this->ipath,
|
||||
$this->iquery,
|
||||
$this->ifragment,
|
||||
$return);
|
||||
return $return;
|
||||
return false;
|
||||
}
|
||||
|
||||
$return = $this->set_scheme($parsed['scheme'])
|
||||
&& $this->set_authority($parsed['authority'])
|
||||
&& $this->set_path($parsed['path'])
|
||||
&& $this->set_query($parsed['query'])
|
||||
&& $this->set_fragment($parsed['fragment']);
|
||||
|
||||
$cache[$iri] = array($this->scheme,
|
||||
$this->iuserinfo,
|
||||
$this->ihost,
|
||||
$this->port,
|
||||
$this->ipath,
|
||||
$this->iquery,
|
||||
$this->ifragment,
|
||||
$return);
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -915,42 +900,40 @@ class SimplePie_IRI
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
$remaining = $authority;
|
||||
if (($iuserinfo_end = strrpos($remaining, '@')) !== false)
|
||||
{
|
||||
$iuserinfo = substr($remaining, 0, $iuserinfo_end);
|
||||
$remaining = substr($remaining, $iuserinfo_end + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$remaining = $authority;
|
||||
if (($iuserinfo_end = strrpos($remaining, '@')) !== false)
|
||||
{
|
||||
$iuserinfo = substr($remaining, 0, $iuserinfo_end);
|
||||
$remaining = substr($remaining, $iuserinfo_end + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$iuserinfo = null;
|
||||
}
|
||||
if (($port_start = strpos($remaining, ':', strpos($remaining, ']'))) !== false)
|
||||
{
|
||||
if (($port = substr($remaining, $port_start + 1)) === false)
|
||||
{
|
||||
$port = null;
|
||||
}
|
||||
$remaining = substr($remaining, 0, $port_start);
|
||||
}
|
||||
else
|
||||
$iuserinfo = null;
|
||||
}
|
||||
if (($port_start = strpos($remaining, ':', strpos($remaining, ']'))) !== false)
|
||||
{
|
||||
if (($port = substr($remaining, $port_start + 1)) === false)
|
||||
{
|
||||
$port = null;
|
||||
}
|
||||
|
||||
$return = $this->set_userinfo($iuserinfo) &&
|
||||
$this->set_host($remaining) &&
|
||||
$this->set_port($port);
|
||||
|
||||
$cache[$authority] = array($this->iuserinfo,
|
||||
$this->ihost,
|
||||
$this->port,
|
||||
$return);
|
||||
|
||||
return $return;
|
||||
$remaining = substr($remaining, 0, $port_start);
|
||||
}
|
||||
else
|
||||
{
|
||||
$port = null;
|
||||
}
|
||||
|
||||
$return = $this->set_userinfo($iuserinfo) &&
|
||||
$this->set_host($remaining) &&
|
||||
$this->set_port($port);
|
||||
|
||||
$cache[$authority] = array($this->iuserinfo,
|
||||
$this->ihost,
|
||||
$this->port,
|
||||
$return);
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1050,11 +1033,9 @@ class SimplePie_IRI
|
||||
$this->scheme_normalization();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->port = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->port = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1066,7 +1047,7 @@ class SimplePie_IRI
|
||||
public function set_path($ipath, $clear_cache = false)
|
||||
{
|
||||
static $cache;
|
||||
if ($clear_cache)
|
||||
if ($clear_cache)
|
||||
{
|
||||
$cache = null;
|
||||
return;
|
||||
@@ -1185,7 +1166,7 @@ class SimplePie_IRI
|
||||
{
|
||||
$iri .= $this->ipath;
|
||||
}
|
||||
elseif (!empty($this->normalization[$this->scheme]['ipath']) && $iauthority !== null && $iauthority !== '')
|
||||
elseif (!empty($this->normalization[$this->scheme]['ipath']) && $iauthority !== null && $iauthority !== '')
|
||||
{
|
||||
$iri .= $this->normalization[$this->scheme]['ipath'];
|
||||
}
|
||||
@@ -1229,16 +1210,14 @@ class SimplePie_IRI
|
||||
{
|
||||
$iauthority .= $this->ihost;
|
||||
}
|
||||
if ($this->port !== null)
|
||||
if ($this->port !== null && $this->port !== 0)
|
||||
{
|
||||
$iauthority .= ':' . $this->port;
|
||||
}
|
||||
return $iauthority;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1251,7 +1230,7 @@ class SimplePie_IRI
|
||||
$iauthority = $this->get_iauthority();
|
||||
if (is_string($iauthority))
|
||||
return $this->to_uri($iauthority);
|
||||
else
|
||||
return $iauthority;
|
||||
|
||||
return $iauthority;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,10 +147,8 @@ class SimplePie_Item
|
||||
{
|
||||
return $this->data['child'][$namespace][$tag];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -366,10 +364,8 @@ class SimplePie_Item
|
||||
{
|
||||
return $this->get_content(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -407,18 +403,16 @@ class SimplePie_Item
|
||||
{
|
||||
return $this->get_description(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the media:thumbnail of the item
|
||||
*
|
||||
* Uses `<media:thumbnail>`
|
||||
*
|
||||
*
|
||||
*
|
||||
* @return array|null
|
||||
*/
|
||||
public function get_thumbnail()
|
||||
@@ -435,7 +429,7 @@ class SimplePie_Item
|
||||
}
|
||||
}
|
||||
return $this->data['thumbnail'];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a category for the item
|
||||
@@ -451,10 +445,8 @@ class SimplePie_Item
|
||||
{
|
||||
return $categories[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -519,10 +511,8 @@ class SimplePie_Item
|
||||
{
|
||||
return array_unique($categories);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -539,10 +529,8 @@ class SimplePie_Item
|
||||
{
|
||||
return $authors[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -559,10 +547,8 @@ class SimplePie_Item
|
||||
{
|
||||
return $contributors[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -571,7 +557,7 @@ class SimplePie_Item
|
||||
* Uses `<atom:contributor>`
|
||||
*
|
||||
* @since 1.1
|
||||
* @return array|null List of {@see SimplePie_Author} objects
|
||||
* @return SimplePie_Author[]|null List of {@see SimplePie_Author} objects
|
||||
*/
|
||||
public function get_contributors()
|
||||
{
|
||||
@@ -625,10 +611,8 @@ class SimplePie_Item
|
||||
{
|
||||
return array_unique($contributors);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -637,7 +621,7 @@ class SimplePie_Item
|
||||
* Uses `<atom:author>`, `<author>`, `<dc:creator>` or `<itunes:author>`
|
||||
*
|
||||
* @since Beta 2
|
||||
* @return array|null List of {@see SimplePie_Author} objects
|
||||
* @return SimplePie_Author[]|null List of {@see SimplePie_Author} objects
|
||||
*/
|
||||
public function get_authors()
|
||||
{
|
||||
@@ -715,10 +699,8 @@ class SimplePie_Item
|
||||
{
|
||||
return $authors;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -743,10 +725,8 @@ class SimplePie_Item
|
||||
{
|
||||
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -825,10 +805,8 @@ class SimplePie_Item
|
||||
return date($date_format, $this->data['date']['parsed']);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -876,10 +854,8 @@ class SimplePie_Item
|
||||
return date($date_format, $this->data['updated']['parsed']);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -905,10 +881,8 @@ class SimplePie_Item
|
||||
{
|
||||
return strftime($date_format, $date);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -969,10 +943,8 @@ class SimplePie_Item
|
||||
{
|
||||
return $enclosure->get_link();
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -990,10 +962,8 @@ class SimplePie_Item
|
||||
{
|
||||
return $links[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1073,10 +1043,8 @@ class SimplePie_Item
|
||||
{
|
||||
return $this->data['links'][$rel];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1096,10 +1064,8 @@ class SimplePie_Item
|
||||
{
|
||||
return $enclosures[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2922,10 +2888,8 @@ class SimplePie_Item
|
||||
{
|
||||
return $this->data['enclosures'];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2950,10 +2914,8 @@ class SimplePie_Item
|
||||
{
|
||||
return (float) $match[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2982,10 +2944,8 @@ class SimplePie_Item
|
||||
{
|
||||
return (float) $match[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3000,10 +2960,7 @@ class SimplePie_Item
|
||||
{
|
||||
return $this->registry->create('Source', array($this, $return[0]));
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,14 +62,18 @@ class SimplePie_Locator
|
||||
var $base_location = 0;
|
||||
var $checked_feeds = 0;
|
||||
var $max_checked_feeds = 10;
|
||||
var $force_fsockopen = false;
|
||||
var $curl_options = array();
|
||||
protected $registry;
|
||||
|
||||
public function __construct(SimplePie_File $file, $timeout = 10, $useragent = null, $max_checked_feeds = 10)
|
||||
public function __construct(SimplePie_File $file, $timeout = 10, $useragent = null, $max_checked_feeds = 10, $force_fsockopen = false, $curl_options = array())
|
||||
{
|
||||
$this->file = $file;
|
||||
$this->useragent = $useragent;
|
||||
$this->timeout = $timeout;
|
||||
$this->max_checked_feeds = $max_checked_feeds;
|
||||
$this->force_fsockopen = $force_fsockopen;
|
||||
$this->curl_options = $curl_options;
|
||||
|
||||
if (class_exists('DOMDocument'))
|
||||
{
|
||||
@@ -154,14 +158,8 @@ class SimplePie_Locator
|
||||
{
|
||||
$mime_types[] = 'text/html';
|
||||
}
|
||||
if (in_array($sniffed, $mime_types))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return in_array($sniffed, $mime_types);
|
||||
}
|
||||
elseif ($file->method & SIMPLEPIE_FILE_SOURCE_LOCAL)
|
||||
{
|
||||
@@ -210,10 +208,8 @@ class SimplePie_Locator
|
||||
{
|
||||
return array_values($feeds);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
protected function search_elements_by_tag($name, &$done, $feeds)
|
||||
@@ -254,7 +250,7 @@ class SimplePie_Locator
|
||||
$headers = array(
|
||||
'Accept' => 'application/atom+xml, application/rss+xml, application/rdf+xml;q=0.9, application/xml;q=0.8, text/xml;q=0.8, text/html;q=0.7, unknown/unknown;q=0.1, application/unknown;q=0.1, */*;q=0.1',
|
||||
);
|
||||
$feed = $this->registry->create('File', array($href, $this->timeout, 5, $headers, $this->useragent));
|
||||
$feed = $this->registry->create('File', array($href, $this->timeout, 5, $headers, $this->useragent, $this->force_fsockopen, $this->curl_options));
|
||||
if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed, true))
|
||||
{
|
||||
$feeds[$href] = $feed;
|
||||
@@ -384,7 +380,7 @@ class SimplePie_Locator
|
||||
$headers = array(
|
||||
'Accept' => 'application/atom+xml, application/rss+xml, application/rdf+xml;q=0.9, application/xml;q=0.8, text/xml;q=0.8, text/html;q=0.7, unknown/unknown;q=0.1, application/unknown;q=0.1, */*;q=0.1',
|
||||
);
|
||||
$feed = $this->registry->create('File', array($value, $this->timeout, 5, $headers, $this->useragent));
|
||||
$feed = $this->registry->create('File', array($value, $this->timeout, 5, $headers, $this->useragent, $this->force_fsockopen, $this->curl_options));
|
||||
if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed))
|
||||
{
|
||||
return array($feed);
|
||||
@@ -412,7 +408,7 @@ class SimplePie_Locator
|
||||
$headers = array(
|
||||
'Accept' => 'application/atom+xml, application/rss+xml, application/rdf+xml;q=0.9, application/xml;q=0.8, text/xml;q=0.8, text/html;q=0.7, unknown/unknown;q=0.1, application/unknown;q=0.1, */*;q=0.1',
|
||||
);
|
||||
$feed = $this->registry->create('File', array($value, $this->timeout, 5, null, $this->useragent));
|
||||
$feed = $this->registry->create('File', array($value, $this->timeout, 5, null, $this->useragent, $this->force_fsockopen, $this->curl_options));
|
||||
if ($feed->success && ($feed->method & SIMPLEPIE_FILE_SOURCE_REMOTE === 0 || ($feed->status_code === 200 || $feed->status_code > 206 && $feed->status_code < 300)) && $this->is_feed($feed))
|
||||
{
|
||||
return array($feed);
|
||||
@@ -426,4 +422,3 @@ class SimplePie_Locator
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -217,10 +217,8 @@ class SimplePie_Misc
|
||||
{
|
||||
return substr_replace($url, 'itpc', 0, 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $url;
|
||||
}
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
public static function array_merge_recursive($array1, $array2)
|
||||
@@ -234,9 +232,9 @@ class SimplePie_Misc
|
||||
else
|
||||
{
|
||||
$array1[$key] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $array1;
|
||||
}
|
||||
|
||||
@@ -276,10 +274,8 @@ class SimplePie_Misc
|
||||
{
|
||||
return chr($integer);
|
||||
}
|
||||
else
|
||||
{
|
||||
return strtoupper($match[0]);
|
||||
}
|
||||
|
||||
return strtoupper($match[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -343,11 +339,9 @@ class SimplePie_Misc
|
||||
{
|
||||
return $return;
|
||||
}
|
||||
|
||||
// If we can't do anything, just fail
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected static function change_encoding_mbstring($data, $input, $output)
|
||||
@@ -1858,10 +1852,8 @@ class SimplePie_Misc
|
||||
{
|
||||
return trim($mime);
|
||||
}
|
||||
else
|
||||
{
|
||||
return trim(substr($mime, 0, $pos));
|
||||
}
|
||||
|
||||
return trim(substr($mime, 0, $pos));
|
||||
}
|
||||
|
||||
public static function atom_03_construct_type($attribs)
|
||||
@@ -1894,10 +1886,8 @@ class SimplePie_Misc
|
||||
return SIMPLEPIE_CONSTRUCT_NONE | $mode;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return SIMPLEPIE_CONSTRUCT_TEXT | $mode;
|
||||
}
|
||||
|
||||
return SIMPLEPIE_CONSTRUCT_TEXT | $mode;
|
||||
}
|
||||
|
||||
public static function atom_10_construct_type($attribs)
|
||||
@@ -1947,10 +1937,8 @@ class SimplePie_Misc
|
||||
return SIMPLEPIE_CONSTRUCT_BASE64;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return SIMPLEPIE_CONSTRUCT_TEXT;
|
||||
}
|
||||
|
||||
return SIMPLEPIE_CONSTRUCT_TEXT;
|
||||
}
|
||||
|
||||
public static function is_isegment_nz_nc($string)
|
||||
@@ -2007,11 +1995,9 @@ class SimplePie_Misc
|
||||
{
|
||||
return chr(0xf0 | ($codepoint >> 18)) . chr(0x80 | (($codepoint >> 12) & 0x3f)) . chr(0x80 | (($codepoint >> 6) & 0x3f)) . chr(0x80 | ($codepoint & 0x3f));
|
||||
}
|
||||
else
|
||||
{
|
||||
// U+FFFD REPLACEMENT CHARACTER
|
||||
return "\xEF\xBF\xBD";
|
||||
}
|
||||
|
||||
// U+FFFD REPLACEMENT CHARACTER
|
||||
return "\xEF\xBF\xBD";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2215,10 +2201,8 @@ function embed_wmedia(width, height, link) {
|
||||
{
|
||||
return filemtime(dirname(__FILE__) . '/Core.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
return filemtime(__FILE__);
|
||||
}
|
||||
|
||||
return filemtime(__FILE__);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2276,4 +2260,3 @@ function embed_wmedia(width, height, link) {
|
||||
// No-op
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -173,10 +173,8 @@ class SimplePie_Net_IPv6
|
||||
{
|
||||
return implode(':', $ip_parts);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $ip_parts[0];
|
||||
}
|
||||
|
||||
return $ip_parts[0];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -200,10 +198,8 @@ class SimplePie_Net_IPv6
|
||||
$ipv4_part = substr($ip, $pos + 1);
|
||||
return array($ipv6_part, $ipv4_part);
|
||||
}
|
||||
else
|
||||
{
|
||||
return array($ip, '');
|
||||
}
|
||||
|
||||
return array($ip, '');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -253,10 +249,8 @@ class SimplePie_Net_IPv6
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -694,10 +694,8 @@ class SimplePie_Parse_Date
|
||||
|
||||
return gmmktime($match[4], $match[5], $second, $match[2], $match[3], $match[1]) - $timezone;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -848,10 +846,8 @@ class SimplePie_Parse_Date
|
||||
|
||||
return gmmktime($match[5], $match[6], $second, $month, $match[2], $match[4]) - $timezone;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -913,10 +909,8 @@ class SimplePie_Parse_Date
|
||||
|
||||
return gmmktime($match[5], $match[6], $match[7], $month, $match[2], $match[4]) - $timezone;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -955,10 +949,8 @@ class SimplePie_Parse_Date
|
||||
$month = $this->month[strtolower($match[2])];
|
||||
return gmmktime($match[4], $match[5], $match[6], $month, $match[3], $match[7]);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -974,10 +966,7 @@ class SimplePie_Parse_Date
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $strtotime;
|
||||
}
|
||||
|
||||
return $strtotime;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -103,10 +103,8 @@ class SimplePie_Rating
|
||||
{
|
||||
return $this->scheme;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -120,9 +118,7 @@ class SimplePie_Rating
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,10 +112,8 @@ class SimplePie_Restriction
|
||||
{
|
||||
return $this->relationship;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -129,10 +127,8 @@ class SimplePie_Restriction
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -146,9 +142,7 @@ class SimplePie_Restriction
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -354,7 +354,7 @@ class SimplePie_Sanitize
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error("$this->cache_location is not writeable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.", E_USER_WARNING);
|
||||
trigger_error("$this->cache_location is not writable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.", E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,10 +79,8 @@ class SimplePie_Source
|
||||
{
|
||||
return $this->data['child'][$namespace][$tag];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function get_base($element = array())
|
||||
@@ -130,10 +128,8 @@ class SimplePie_Source
|
||||
{
|
||||
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function get_category($key = 0)
|
||||
@@ -143,10 +139,8 @@ class SimplePie_Source
|
||||
{
|
||||
return $categories[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function get_categories()
|
||||
@@ -200,10 +194,8 @@ class SimplePie_Source
|
||||
{
|
||||
return array_unique($categories);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function get_author($key = 0)
|
||||
@@ -213,10 +205,8 @@ class SimplePie_Source
|
||||
{
|
||||
return $authors[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function get_authors()
|
||||
@@ -283,10 +273,8 @@ class SimplePie_Source
|
||||
{
|
||||
return array_unique($authors);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function get_contributor($key = 0)
|
||||
@@ -296,10 +284,8 @@ class SimplePie_Source
|
||||
{
|
||||
return $contributors[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function get_contributors()
|
||||
@@ -354,10 +340,8 @@ class SimplePie_Source
|
||||
{
|
||||
return array_unique($contributors);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function get_link($key = 0, $rel = 'alternate')
|
||||
@@ -367,10 +351,8 @@ class SimplePie_Source
|
||||
{
|
||||
return $links[$key];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -449,10 +431,8 @@ class SimplePie_Source
|
||||
{
|
||||
return $this->data['links'][$rel];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function get_description()
|
||||
@@ -493,10 +473,8 @@ class SimplePie_Source
|
||||
{
|
||||
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_HTML, $this->get_base($return[0]));
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function get_copyright()
|
||||
@@ -521,10 +499,8 @@ class SimplePie_Source
|
||||
{
|
||||
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function get_language()
|
||||
@@ -545,10 +521,8 @@ class SimplePie_Source
|
||||
{
|
||||
return $this->sanitize($this->data['xml_lang'], SIMPLEPIE_CONSTRUCT_TEXT);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function get_latitude()
|
||||
@@ -561,10 +535,8 @@ class SimplePie_Source
|
||||
{
|
||||
return (float) $match[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function get_longitude()
|
||||
@@ -581,10 +553,8 @@ class SimplePie_Source
|
||||
{
|
||||
return (float) $match[2];
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function get_image_url()
|
||||
@@ -601,10 +571,7 @@ class SimplePie_Source
|
||||
{
|
||||
return $this->sanitize($return[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($return[0]));
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -136,13 +136,11 @@ class SimplePie_XML_Declaration_Parser
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->version = '';
|
||||
$this->encoding = '';
|
||||
$this->standalone = '';
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->version = '';
|
||||
$this->encoding = '';
|
||||
$this->standalone = '';
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -338,10 +338,8 @@ class SimplePie_gzdecode
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->position = $this->compressed_size - 8;
|
||||
}
|
||||
|
||||
$this->position = $this->compressed_size - 8;
|
||||
|
||||
// Check CRC of data
|
||||
$crc = current(unpack('V', substr($this->compressed_data, $this->position, 4)));
|
||||
@@ -362,9 +360,7 @@ class SimplePie_gzdecode
|
||||
// Wow, against all odds, we've actually got a valid gzip string
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user