Skip to content

Commit aaf614b

Browse files
author
h.woltersdorf
committed
Added .gitignore
Fixed usage of wrong member in ReflectionClass Replaced fixed /tmp directory with sys_get_temp_dir()
1 parent 54aa397 commit aaf614b

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea/

PHPExport/ReflectionClass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function exportFile( $file_path )
128128

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

134134
$result = file_put_contents( $file_path, $content );

PHPExport/ReflectionExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function exportFiles( $directory, $create_sub_directories = true )
113113
public function exportPHAR( $phar_name, $output_dir = '.', $create_sub_directories = true )
114114
{
115115
ini_set( 'phar.readonly', 0 );
116-
$temp_dir = '/tmp' . DIRECTORY_SEPARATOR . 'PHPExport_' . rand( 1, 9999 );
116+
$temp_dir = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'PHPExport_' . rand( 1, 9999 );
117117

118118
if ( !file_exists( $temp_dir ) && !@mkdir( $temp_dir ) )
119119
{

0 commit comments

Comments
 (0)