"warning: array_fill() [function.array-fill]: Number of elements must be positive in .. database.inc on line 241"

webel - December 29, 2008 - 00:34
Project:BookMadeSimple
Version:6.x-1.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

When viewing any node NOT authored by 'admin' as 'admin' (only) I get the following ERROR message:

    * warning: array_fill() [function.array-fill]: Number of elements must be positive in
... /drupal/includes/database.inc on line 241.
    * warning: implode() [function.implode]: Invalid arguments passed in /Library/WebServer/Documents/drupal/includes/database.inc on line 241.
    * warning: array_keys() [function.array-keys]: The first argument should be an array in
.../drupal/modules/user/user.module on line 500.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT p.perm FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in .../drupal/modules/user/user.module on line 500.

Strangely, it does not seem to happen the other way around as an authenticated user when viewing a node created by 'admin'.
(And I checked the logs also.)

Also, it does not happen on views or other dynamic pages, only on content nodes,
presumably on those where the extra [add child] pulldown menu is generated.

It is definitely provoked by BookMadeSimple, I've experimented with enabling/disabling the module to isolate it as the cause.

I really like this module (and thanks for the work on it) and I hope you can investigate the problem.

#1

MarcElbichon - December 29, 2008 - 17:05

Corrected.

Can you get the last release from http://mmr-drupal-modules.googlecode.com/files/BookMadeSimple_6.x_1.4.zip ?

#2

webel - December 30, 2008 - 21:17

Hi,

> http://mmr-drupal-modules.googlecode.com/files/BookMadeSimple_6.x_1.4.zip

Thanks for your attention to this. However the above link does not seem to exist (or I can't access), I get a blank page.

#3

MarcElbichon - December 31, 2008 - 08:33

#4

MarcElbichon - December 31, 2008 - 08:34
Status:active» patch (to be ported)

Or apply this patch

AttachmentSize
patch.txt 1.19 KB

#5

webel - December 31, 2008 - 23:52

Seems to have worked, thanks for fix, and Happy New Year in 2009 !

#6

MarcElbichon - January 2, 2009 - 15:08
Status:patch (to be ported)» closed
 
 

Drupal is a registered trademark of Dries Buytaert.