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
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | ddblock-fix-warning-no-images-1053996-1.patch | 6.09 KB | ppblaauw |
Comments
Comment #1
sevol commentedI get the same problem. Did you create the image folder yet?
Comment #2
ppblaauw commentedThese 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
Comment #3
W32 commentedPerhaps this a bug of the Drupal 7 file system core (http://drupal.org/node/1055170)
Comment #4
W32 commentedSevol, Yes, but my folder is junction link (symlink) on Windows NTFS volume
Comment #5
W32 commentedppblaauw, 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?
Comment #6
W32 commentedI 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.
Comment #7
ppblaauw commentedcommitted to cvs