error while viewing node - warning: array_shift() [function.array-shift

TC44 - August 4, 2009 - 05:53
Project:Custom Breadcrumbs
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hi there,

Thanks for your work on this module. I installed the 6.x dev today and got some errors while viewing content.

The errors below came up while viewing a node of a content type that was not designated as having a custom breadcrumb at all, so I'm not sure why it came up.

I only had one breadcrumb designated on the site for nodes of a different content type, which used a token as the title and as the link.

The error did come up consistently until I disabled the module.

Any suggestions would be appreciated.

--------------

* warning: array_shift() [function.array-shift]: The argument should be an array in /home/mysite/public_html/sites/all/modules/custom_breadcrumbs/custom_breadcrumbs_common.inc on line 38.
* warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/mysite/public_html/sites/all/modules/custom_breadcrumbs/custom_breadcrumbs_common.inc on line 43.
* warning: implode() [function.implode]: Invalid arguments passed in /home/mysite/public_html/sites/all/modules/custom_breadcrumbs/custom_breadcrumbs_common.inc on line 45.
* warning: array_shift() [function.array-shift]: The argument should be an array in /home/mysite/public_html/sites/all/modules/custom_breadcrumbs/custom_breadcrumbs_common.inc on line 38.
* warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/mysite/public_html/sites/all/modules/custom_breadcrumbs/custom_breadcrumbs_common.inc on line 43.
* warning: implode() [function.implode]: Invalid arguments passed in /home/mysite/public_html/sites/all/modules/custom_breadcrumbs/custom_breadcrumbs_common.inc on line 45.
* warning: array_pop() [function.array-pop]: The argument should be an array in /home/mysite/public_html/sites/all/modules/custom_breadcrumbs/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.module on line 187.
* warning: array_pop() [function.array-pop]: The argument should be an array in /home/mysite/public_html/sites/all/modules/custom_breadcrumbs/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.module on line 187.
* warning: array_pop() [function.array-pop]: The argument should be an array in /home/mysite/public_html/sites/all/modules/custom_breadcrumbs/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.module on line 187.
* warning: array_pop() [function.array-pop]: The argument should be an array in /home/mysite/public_html/sites/all/modules/custom_breadcrumbs/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.module on line 187.
* warning: array_pop() [function.array-pop]: The argument should be an array in /home/mysite/public_html/sites/all/modules/custom_breadcrumbs/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.module on line 187.
* warning: array_pop() [function.array-pop]: The argument should be an array in /home/mysite/public_html/sites/all/modules/custom_breadcrumbs/custom_breadcrumbs_taxonomy/custom_breadcrumbs_taxonomy.module on line 187.

#1

MGN - August 5, 2009 - 12:47

Can you test the following patches? I think this should prevent these warnings. Thanks!

AttachmentSize
539416_cb_common_warning_patch.diff 1.29 KB
539416_cb_tax_mod_warning_patch.diff 3.91 KB

#2

MGN - August 5, 2009 - 12:47
Status:active» needs review

#3

TC44 - August 5, 2009 - 17:10

Hi MGN,

I will certainly do that. I'll enable cb again and try and reproduce the errors, then test the patches later today.

Thanks again!

#4

TC44 - August 5, 2009 - 21:39

After applying the patches, the taxonomy errors went away, but the others still persist.
So I still get:

* warning: array_shift() [function.array-shift]: The argument should be an array in /home/mysite/public_html/sites/all/modules/custom_breadcrumbs/custom_breadcrumbs_common.inc on line 38.
* warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/mysite/public_html/sites/all/modules/custom_breadcrumbs/custom_breadcrumbs_common.inc on line 43.
* warning: implode() [function.implode]: Invalid arguments passed in /home/mysite/public_html/sites/all/modules/custom_breadcrumbs/custom_breadcrumbs_common.inc on line 45.
* warning: array_shift() [function.array-shift]: The argument should be an array in /home/mysite/public_html/sites/all/modules/custom_breadcrumbs/custom_breadcrumbs_common.inc on line 38.
* warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/mysite/public_html/sites/all/modules/custom_breadcrumbs/custom_breadcrumbs_common.inc on line 43.
* warning: implode() [function.implode]: Invalid arguments passed in /home/mysite/public_html/sites/all/modules/custom_breadcrumbs/custom_breadcrumbs_common.inc on line 45.

#5

TC44 - August 6, 2009 - 00:06

MGN,

I'm going to reinstall CB and run the patches again to double check. I'll give you an update once I've done that.

Thanks again

#6

MGN - August 17, 2009 - 04:16

@TC44, any update on this?

#7

MGN - August 21, 2009 - 01:52
Status:needs review» fixed

Committed to 6.x-2.x-dev for further testing. http://drupal.org/cvs?commit=254122 . Please reopen if these patches did not fix the original problem.

#8

TC44 - August 21, 2009 - 05:38

@MGN,

Sorry, I got sidetracked on other things with the build and haven't gone back to testing custom breadcrumbs yet. I'll try and test again tomorrow.

Thanks!

#9

grsilverman - August 23, 2009 - 00:07
Status:fixed» needs work

I'm getting the same messages after installing a print module update. On my local test site, everything's fine. On my live site, I get the same messages.

#10

MGN - September 19, 2009 - 04:15
Status:needs work» fixed

Assuming that this is ok now in the latest code since there hasn't been followup. If you are still getting warnings, please open a new issue.

#11

System Message - October 3, 2009 - 04:20
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.