Skip to content

Commit

Permalink
# Correctly register stream wrapper before usage
Browse files Browse the repository at this point in the history
  • Loading branch information
kore committed May 17, 2010
1 parent d566463 commit 3858ea3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/classes/check.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,12 @@ protected function getFileContents( pchRepository $repository, $file )
$fileContents->argument( $file );
$fileContents->execute();

$stream = fopen( 'string://', 'w' );
if ( !in_array( 'pchString', stream_get_wrappers() ) )
{
stream_wrapper_register( 'pchString', 'pchStringStream' );
}

$stream = fopen( 'pchString://', 'w' );
fwrite( $stream, $fileContents->stdoutOutput );
fseek( $stream, 0 );
return $stream;
Expand Down

0 comments on commit 3858ea3

Please sign in to comment.