Fatal error: Can't use function return value in write context in /home/redempt2/public_html/d6/modules/filebrowser/filebrowser.install on line 49

Comments

Susurrus’s picture

Instead of this on line 49:

if (!empty(variable_get('filebrowser_root', ''))) {

try

global $conf;
if (isset($conf['filebrowser_root'])) {

Also, does this error occur when you're trying to update or right after you visit a page after installing this module?

Susurrus’s picture

Status: Active » Needs review
aMakUzr’s picture

Re:

..does this error occur when you're trying to update or right after you visit a page after installing this module?

For me, the answers was "yes" 'n "had to remove the module then run update.php to get Drupal to run, at all"

After that I reinstalled the previous verison (6.x-2.x-dev datestamp = "1212365042") and made the suggested change to 6.x-2.0-beta.

Copying the 6.x-2.0-beta over the 6.x-2.x-dev (datestamp = "1212365042") version then running update.php yielded:

user warning: Duplicate column name 'nid' query: ALTER TABLE filebrowser ADD `nid` INT unsigned DEFAULT NULL in /Volumes/Stuff/WebServer/SyncEm/includes/database.mysql-common.inc on line 298.
user warning: Duplicate column name 'file_blacklist' query: ALTER TABLE filebrowser ADD `file_blacklist` VARCHAR(255) DEFAULT NULL in /Volumes/Stuff/WebServer/SyncEm/includes/database.mysql-common.inc on line 298.
user warning: Unknown column 'location' in 'filebrowser' query: ALTER TABLE filebrowser CHANGE location `file_path` VARCHAR(255) NOT NULL in /Volumes/Stuff/WebServer/SyncEm/includes/database.mysql-common.inc on line 520.
user warning: Unknown column 'can_explore' in 'filebrowser' query: ALTER TABLE filebrowser CHANGE can_explore `explore_subdirs` TINYINT NOT NULL in /Volumes/Stuff/WebServer/SyncEm/includes/database.mysql-common.inc on line 520.
user warning: Unknown column 'path' in 'field list' query: SELECT file_path, path, explore_subdirs FROM filebrowser in /Volumes/Stuff/WebServer/SyncEm/sites/all/modules/filebrowser/filebrowser.install on line 79.
user warning: Can't DROP 'path'; check that column/key exists query: ALTER TABLE filebrowser DROP path in /Volumes/Stuff/WebServer/SyncEm/includes/database.mysql-common.inc on line 322.

followed by

The following queries were executed
filebrowser module
Update #6100
No queries
Update #6200
Failed: ALTER TABLE {filebrowser} ADD `nid` INT unsigned DEFAULT NULL
ALTER TABLE {filebrowser} CHANGE nid `nid` INT unsigned NOT NULL
Failed: ALTER TABLE {filebrowser} ADD `file_blacklist` VARCHAR(255) DEFAULT NULL
ALTER TABLE {filebrowser} CHANGE file_blacklist `file_blacklist` VARCHAR(255) NOT NULL
Failed: ALTER TABLE {filebrowser} CHANGE location `file_path` VARCHAR(255) NOT NULL
ALTER TABLE {filebrowser} DROP PRIMARY KEY
Failed: ALTER TABLE {filebrowser} CHANGE can_explore `explore_subdirs` TINYINT NOT NULL
TRUNCATE TABLE {filebrowser}
ALTER TABLE {filebrowser} ADD PRIMARY KEY (nid)
Failed: ALTER TABLE {filebrowser} DROP path

At that point I uninstalled 6.x-2.0-beta and then reinstalled it and that seems to have worked ('though an empty directory is not shown when subdirectories are requested).

BTW, I suggest the label for the "subdirectories" checkbox be changed to:
Allow subdirectory listings

Susurrus’s picture

Okay, I've committed that change I suggested you make. Needing to reinstall the module makes sense.

I've also committed the new suggested subdirectories label because it's more clear.

I'm curious now about the bug you found. Can you give me more detail as I'm not sure what "empty folder" means in this case.

Susurrus’s picture

Status: Needs review » Fixed

I'm going to mark this fixed. If there is a bug, please file a separate issue for it.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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