aboutsummaryrefslogtreecommitdiffstats
path: root/includes/StreamFile.php
diff options
context:
space:
mode:
authorAaron Schulz <aaron@users.mediawiki.org>2012-01-17 05:34:01 +0000
committerAaron Schulz <aaron@users.mediawiki.org>2012-01-17 05:34:01 +0000
commitf1a06be61c916943021a971da5c470935a67e166 (patch)
treec4ad18c0c855396e5030b6c9dd62ae0d22dbaf85 /includes/StreamFile.php
parentcf4049dc3930f93c542ee2b4d390f7f025b4a881 (diff)
downloadmediawikicore-f1a06be61c916943021a971da5c470935a67e166.tar.gz
mediawikicore-f1a06be61c916943021a971da5c470935a67e166.zip
* Fixed type check in StreamFile::prepareForStream() for 404s
* Code comment tweaks and fixes
Notes
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/109106
Diffstat (limited to 'includes/StreamFile.php')
-rw-r--r--includes/StreamFile.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/StreamFile.php b/includes/StreamFile.php
index 89c862e1ad78..dc70712ad4c5 100644
--- a/includes/StreamFile.php
+++ b/includes/StreamFile.php
@@ -41,17 +41,17 @@ class StreamFile {
* (c) sends Content-Length header based on HTTP_IF_MODIFIED_SINCE check
*
* @param $path string Storage path or file system path
- * @param $info Array File stat info with 'mtime' and 'size' fields
+ * @param $info Array|false File stat info with 'mtime' and 'size' fields
* @param $headers Array Additional headers to send
* @param $sendErrors bool Send error messages if errors occur (like 404)
* @return int|false READY_STREAM, NOT_MODIFIED, or false on failure
*/
public static function prepareForStream(
- $path, array $info, $headers = array(), $sendErrors = true
+ $path, $info, $headers = array(), $sendErrors = true
) {
global $wgLanguageCode;
- if ( !$info ) {
+ if ( !is_array( $info ) ) {
if ( $sendErrors ) {
header( 'HTTP/1.0 404 Not Found' );
header( 'Cache-Control: no-cache' );