Skip to content
Snippets Groups Projects
Commit dd74fecf authored by Michael Hamann's avatar Michael Hamann
Browse files

Remove BOM in linesToHash, partial fix for FS#2464

The BOM at the beginning of some plugin.info.txt files prevented the
plugin manager from correctly reading the base property and thus it
installed the plugin in the wrong directory.
parent ad739841
No related branches found
No related tags found
No related merge requests found
......@@ -143,6 +143,9 @@ function getSchemes() {
*/
function linesToHash($lines, $lower=false) {
$conf = array();
// remove BOM
if (isset($lines[0]) && substr($lines[0],0,3) == pack('CCC',0xef,0xbb,0xbf))
$lines[0] = substr($lines[0],3);
foreach ( $lines as $line ) {
//ignore comments (except escaped ones)
$line = preg_replace('/(?<![&\\\\])#.*$/','',$line);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment