Can't name a bean type "bean", there is a PDO error.

Files: 
CommentFileSizeAuthor
#2 1728632-bean_type_class_fix-2.patch488 bytesdonutdan4114
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1728632-bean_type_class_fix-2.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Comments

It looks like the bean type (machine name for bean) can't be 'bean' because the callback (bean_type_load()) to check if the bean type is a valid machine name in turn calls bean_load_plugin_class($type) which after some logic attempts to instantiate a class using the machine name as an argument. This results for me in the error:

Error: Cannot instantiate abstract class BeanPlugin in /opt/www/tng-fresh/sites/all/modules/contrib/bean/bean.module, line 346

I suppose some additional validation could be put in there to get around this but I'm not sure what other protected bean names, if any, would have to be added. For now the obvious workaround is to not use a machine name for your bean of 'bean' :)

Status:Active» Needs review
StatusFileSize
new488 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1728632-bean_type_class_fix-2.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Check to see if the class can be instantiated.

Status:Needs review» Fixed

I'm fine with 'bean' being protected. This is a nice solution.

-- http://drupalcode.org/project/bean.git/commit/3227c5a

Status:Fixed» Closed (fixed)

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