Skip to content

Commit

Permalink
Get sample without fetching the whole file, fix netbeans potential error
Browse files Browse the repository at this point in the history
  • Loading branch information
asig2016 committed Feb 28, 2017
1 parent fb28d7f commit 1dac0eb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions importexport/inc/class.importexport_import_ui.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ public function import_dialog($content = array()) {
$plugin = new $definition_obj->plugin;

// Check file encoding matches import
$sample = file_get_contents($content['file']['tmp_name']);
$sample = mb_substr( $sample, 1024 );
$sample = mb_substr(file_get_contents($content['file']['tmp_name'], false, null, 0, 2048), 1024);

if($appname == 'addressbook' && $definition_obj->plugin == 'addressbook_import_vcard')
{
Expand Down

0 comments on commit 1dac0eb

Please sign in to comment.