Created on 10 May 2023, over 1 year ago
Updated 17 May 2023, over 1 year ago

Problem/Motivation

The website encountered an unexpected error. Please try again later.
ValueError: Path cannot be empty in fopen() (line 40 of modules\user_csv_import\src\Controller\UserCsvImportController.php).

fopen('', 'r') (Line: 40)
Drupal\user_csv_import\Controller\UserCsvImportController::processUpload(Object, Array) (Line: 263)
Drupal\user_csv_import\Form\UserCsvImportForm->submitForm(Array, Object)
...

Steps to reproduce

Upload any CSV on a WAMP-stack, Drupal 9.4.15

Proposed resolution

Replace

$handle = fopen($file->destination, 'r');

with

$handle = fopen(\Drupal::service('file_system')->realpath($file->getFileUri()), 'r');

on line 40 of the UserCsvImportController controller.

๐Ÿ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

๐Ÿ‡ณ๐Ÿ‡ฑNetherlands koosvdkolk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024