When "Image Folder" settings of block is turned on junction folder on Windows NTFS volume module generate errors:

Сообщение об ошибке
Warning: asort() expects parameter 1 to be array, null given в функции _ddblock_get_image_array() (строка 2309 в файле C:\Net\Web\root\sites\all\modules\ddblock\ddblock.module).
Warning: asort() expects parameter 1 to be array, null given в функции _ddblock_get_image_array() (строка 2310 в файле C:\Net\Web\root\sites\all\modules\ddblock\ddblock.module).
Warning: array_slice() expects parameter 1 to be array, null given в функции _ddblock_get_image_array() (строка 2319 в файле C:\Net\Web\root\sites\all\modules\ddblock\ddblock.module).
Warning: array_slice() expects parameter 1 to be array, null given в функции _ddblock_get_image_array() (строка 2320 в файле C:\Net\Web\root\sites\all\modules\ddblock\ddblock.module).
Warning: Invalid argument supplied for foreach() в функции include() (строка 70 в файле C:\Net\Web\root\sites\all\modules\ddblock\ddblock-cycle-block-content.tpl.php).

P.s.: PHP 5.3.5

Comments

sevol’s picture

I get the same problem. Did you create the image folder yet?

ppblaauw’s picture

Status: Active » Needs review
StatusFileSize
new6.09 KB

These warnings will show up if no image can be found.
Added checks if images are available in the folder set, so no warnings will be show.

See patch

Made feature request to add functionality to check folder (see http://drupal.org/node/1055790).
Help appreciated with implementing this

W32’s picture

Status: Needs review » Active

Perhaps this a bug of the Drupal 7 file system core (http://drupal.org/node/1055170)

W32’s picture

Sevol, Yes, but my folder is junction link (symlink) on Windows NTFS volume

W32’s picture

ppblaauw, your patch (check file array size) is good. Drupal 7 function file_scan_directory() is erroneous, it returns zero array if folder is not exists or is NTFS junction link (symlink). Can you apply your patch to current 7.x-1.x-dev version?

W32’s picture

I fix bug in Drupal 7 file system core (http://drupal.org/node/1055170) and now DDBlock work fine (for images ). ppblaauw, please close this issue and apply your patch to code.

ppblaauw’s picture

Title: Errors on junction folder on NTFS volume. » Errors on junction folder on NTFS volume. (Fixed)
Status: Active » Fixed

committed to cvs

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.