The fetch() method tests whether the template file exists using the php function file_exists(). This function returns true whether the 'file' is a file or a directory. If the fetch() function is called with an empty string as the template file name, file_exists() is used to validate the default path. Because this is a valid directory, a value of true is returned. The fetch() function then executes the include() without a proper file name which generates an error. Lines 212 to 216 should be changed from
if( file_exists( $this->path . $file ) ) {
include($this->path . $file); // Include the file
} elseif( file_exists( $this->default_path . $file ) ) {
include( $this->default_path . $file );
}
to
if( is_file( $this->path . $file ) ) {
include($this->path . $file); // Include the file
} elseif( is_file( $this->default_path . $file ) ) {
include( $this->default_path . $file );
}
Regards
Phil
J1.5.10 VM 1.1.3