aboutsummaryrefslogtreecommitdiffstats
path: root/lib/simplepie/library/SimplePie/Enclosure.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/simplepie/library/SimplePie/Enclosure.php')
-rw-r--r--lib/simplepie/library/SimplePie/Enclosure.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/simplepie/library/SimplePie/Enclosure.php b/lib/simplepie/library/SimplePie/Enclosure.php
index ddbbc3c92..71cdd7d45 100644
--- a/lib/simplepie/library/SimplePie/Enclosure.php
+++ b/lib/simplepie/library/SimplePie/Enclosure.php
@@ -5,7 +5,7 @@
* A PHP-Based RSS and Atom Feed Framework.
* Takes the hard work out of managing a complete RSS/Atom solution.
*
- * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors
+ * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
@@ -33,9 +33,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue
+ * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue
* @author Ryan Parman
- * @author Geoffrey Sneddon
+ * @author Sam Sneddon
* @author Ryan McCue
* @link http://simplepie.org/ SimplePie
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
@@ -1152,7 +1152,12 @@ class SimplePie_Enclosure
// If we encounter an unsupported mime-type, check the file extension and guess intelligently.
if (!in_array($type, array_merge($types_flash, $types_fmedia, $types_quicktime, $types_wmedia, $types_mp3)))
{
- switch (strtolower($this->get_extension()))
+ $extension = $this->get_extension();
+ if ($extension === null) {
+ return null;
+ }
+
+ switch (strtolower($extension))
{
// Audio mime-types
case 'aac':
@@ -1302,3 +1307,5 @@ class SimplePie_Enclosure
return $type;
}
}
+
+class_alias('SimplePie_Enclosure', 'SimplePie\Enclosure', false);