Skip to content

Commit

Permalink
Added .gitignore
Browse files Browse the repository at this point in the history
Fixed usage of wrong member in ReflectionClass
Replaced fixed /tmp directory with sys_get_temp_dir()
  • Loading branch information
h.woltersdorf committed Jul 9, 2015
1 parent 54aa397 commit aaf614b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea/
2 changes: 1 addition & 1 deletion PHPExport/ReflectionClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function exportFile( $file_path )

if ( empty($content) )
{
throw new \Exception( "Got no content from export for class {$this->_classname->getName()}" );
throw new \Exception( "Got no content from export for class {$this->_reflection_class->getName()}" );
}

$result = file_put_contents( $file_path, $content );
Expand Down
2 changes: 1 addition & 1 deletion PHPExport/ReflectionExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function exportFiles( $directory, $create_sub_directories = true )
public function exportPHAR( $phar_name, $output_dir = '.', $create_sub_directories = true )
{
ini_set( 'phar.readonly', 0 );
$temp_dir = '/tmp' . DIRECTORY_SEPARATOR . 'PHPExport_' . rand( 1, 9999 );
$temp_dir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'PHPExport_' . rand( 1, 9999 );

if ( !file_exists( $temp_dir ) && !@mkdir( $temp_dir ) )
{
Expand Down

0 comments on commit aaf614b

Please sign in to comment.