Permalink
Browse files

Fixed the wizard for windows/5.4 and extension_dir with new lines tra…

…iling.
  • Loading branch information...
1 parent 80bdcc4 commit a9f9c303d94b843b6a1b136078f704a5ec4fdb17 @derickr derickr committed Apr 6, 2012
Showing with 9 additions and 2 deletions.
  1. +9 −2 html/include/phpinfo-scanner.php
@@ -115,9 +115,10 @@ function analyse( $data )
else if (preg_match( '/extension_dir (.*)/', $data, $m ) )
{
// It's tricky as this is all reliant on the browser
+ $m[1] = trim( $m[1] );
$len = strlen( $m[1] );
- if ( ( $len % 2 == 1 ) && $m[1][(int) ($len / 2) - 1] == ' ') {
- $this->extensionDir = trim( substr( $m[1], 0, (int) ($len / 2) - 1 ) );
+ if ( ( $len % 2 == 1 ) && $m[1][(int) floor($len / 2)] == ' ') {
+ $this->extensionDir = trim( substr( $m[1], 0, (int) floor($len / 2) ) );
}
}
}
@@ -288,6 +289,12 @@ function determineFile()
return false;
}
break;
+ case '5.4':
+ if ( $this->winCompiler != 9 )
+ {
+ return false;
+ }
+ break;
default:
return false;
}

0 comments on commit a9f9c30

Please sign in to comment.