Commit 4ea0669b by pupi1985

Fix a few warnings generated by reading contents from non-existent files

parent 89f04179
......@@ -151,7 +151,7 @@ function qa_admin_theme_options()
$metadata = $metadataUtil->fetchFromAddonPath($directory);
if (empty($metadata)) {
// limit theme parsing to first 8kB
$contents = file_get_contents($directory . '/qa-styles.css', false, null, 0, 8192);
$contents = @file_get_contents($directory . '/qa-styles.css', false, null, 0, 8192);
$metadata = qa_addon_metadata($contents, 'Theme');
}
$options[$theme] = isset($metadata['name']) ? $metadata['name'] : $theme;
......
......@@ -1042,7 +1042,7 @@ foreach ($showoptions as $optionname) {
$metadata = $metadataUtil->fetchFromAddonPath($themedirectory);
if (empty($metadata)) {
// limit theme parsing to first 8kB
$contents = file_get_contents($themedirectory . '/qa-styles.css', false, null, 0, 8192);
$contents = @file_get_contents($themedirectory . '/qa-styles.css', false, null, 0, 8192);
$metadata = qa_addon_metadata($contents, 'Theme');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment