Posted by John Bickar on February 8, 2013 at 11:52pm
3 followers
| Project: | Bean |
| Version: | 7.x-1.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Configuration:
Drupal 7.14
Bean 7.x-1.0
To produce bug:
- Go to block/add
- Receive "Call to undefined function entity_language()" fatal error in bean/includes/bean.pages.inc, line 324.
This is because the entity_language() function was added in Drupal 7.15.
It would be great if there was a check for support of the entity_language() function; if not, a note on the project page to require Drupal >=7.15 would be nice.
Thank you!
Comments
#1
Patchy attachy.
#2
The last submitted patch, bean-entitylanguagefatalerror-1912444-1.patch, failed testing.
#3
Hrm, I don't understand the error message in the failed test, but here's another patch that catches the same error in the validation function.
#4
Setting to needs review so tests can run.
#5
The last submitted patch, bean-entitylanguagefatalerror-1912444-3.patch, failed testing.
#6
+++ b/includes/bean.pages.incundefined@@ -321,7 +321,12 @@ function bean_form($form, &$form_state, Bean $bean, $type = NULL) {
- $langcode = entity_language('bean', $bean);
+ if(function_exists(entity_language)){
+ $langcode = entity_language('bean', $bean);
Need quotes around entity_language in the function_exists calls.
#7
Right. Patching without coffee is a danger to self and others.
#8
With single quotes if that syntax is preferred.
#9
Thanks!
http://drupal.org/commitlog/commit/22232/6545f3be72f1f7cb3c37d3a40300b4b...
#10
Automatically closed -- issue fixed for 2 weeks with no activity.