I'm not sure what's calling it to create the error message however it happens when submitting a webform. The 2nd argument in book_help() doesn't seem to be used so you could just change:

function book_help($path, $arg) {
to
function book_help($path, $arg = NULL) {

Comments

Reg’s picture

I don't think it's the book function because when I changed the 2nd arg it then said missing first arg so I'll do some tracking down and get back to you on this. Also, the line should probably be something like "function book_help($path, $arg = '') {" anyway since NULL as I had it above produces an error (although I don't know why).

Reg’s picture

I should mention that this is with PHP 5.3 which may be part of the issue since it tends to report more errors than previous versions of PHP.

Here is a backtrace from a couple of different ways to get a backtrace, it looks like it's all happening through the core so it may be still valid to call it a bug:

FROM debug_print_backtrace()
#0  book_help()
#1  call_user_func_array(book_help, Array()) called at [/srv/www/vhosts/live/theme.inc:656]
#2  theme(help) called at [/srv/www/vhosts/live/theme.inc:1860]
#3  template_preprocess_page(Array ([template_files] => Array (),[content] => ...,[show_blocks] => 1,[show_messages] => 1,[zebra] => odd,[id] => 1,[directory] => ,[is_admin] => ,[is_front] => 1,[logged_in] => ,[db_is_active] => 1,[user] => stdClass Object ([uid] => 0,[hostname] => 192.168.17.1,[roles] => Array ([1] => anonymous user),[session] => ,[cache] => 0),[left] => ,[right] => ,[header] => ,[footer] => ,[layout] => none,[head_title] => ,[base_path] => /,[front_page] => /,[breadcrumb] => Home, [feed_icons] => ,[footer_message] => ,[head] => ), page)
#4  call_user_func_array(template_preprocess_page, Array ([0] => Array ([template_files] => Array (),[content] => ...,[show_blocks] => 1,[show_messages] => 1,[zebra] => odd,[id] => 1,[directory] => sites/,[is_admin] => ,[is_front] => 1,[logged_in] => ,[db_is_active] => 1,[user] => stdClass Object ([uid] => 0,[hostname] => 192.168.17.1,[roles] => Array ([1] => anonymous user),[session] => ,[cache] => 0),[left] => ,[right] => ,[header] => ,[footer] => ,[layout] => none,[head_title] => ,[base_path] => /,[front_page] => /,[breadcrumb] => Home,[feed_icons] => ,[footer_message] => .,[head] => ),[1] => page))
        called at [/srv/www/vhosts/live/theme.inc:697]
#5  theme(page, ) called at [/srv/www/vhosts/live/index.php:38]

FROM: One of my own debug routines:
array    (
        6    =>
        array    (
                'file'    =>    '/srv/www/vhosts/live/m/multi-001/www/cms/index.php',
                'line'    =>    40,
                'function'    =>    'theme',
                'args'    =>    '',
        ),
        5    =>
        array    (
                'file'    =>    '/srv/www/vhosts/live/m/multi-001/www/cms/includes/theme.inc',
                'line'    =>    697,
                'function'    =>    'call_user_func_array',
                'args'    =>    '',
        ),
        4    =>
        array    (
                'function'    =>    'template_preprocess_page',
                'args'    =>    '',
        ),
        3    =>
        array    (
                'file'    =>    '/srv/www/vhosts/live/m/multi-001/www/cms/includes/theme.inc',
                'line'    =>    1860,
                'function'    =>    'theme',
                'args'    =>    '',
        ),
        2    =>
        array    (
                'file'    =>    '/srv/www/vhosts/live/m/multi-001/www/cms/includes/theme.inc',
                'line'    =>    656,
                'function'    =>    'call_user_func_array',
                'args'    =>    '',
        ),
        1    =>
        array    (
                'function'    =>    'book_help',
                'args'    =>    '',
        ),
)

The above were created with:

function book_help($path = '', $arg = '') {
	if (empty($path)) {
	  echo '<pre>';
		debug_print_backtrace(); # or my routine: print_brt(true);
	  echo '</pre>';
		exit;
	}
  switch ($path) {

As you can see I temporarily gave both params. a default value so the routine would be entered and I could get a backtrace.

Let me know if there is more you need to get a handle on this.

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.