This was generated by running the 5.x-6.x upgrade review on imagefield.module

#
Line 183: hook no longer exists, use hook_form_alter() to swap your own validation handler (Drupal Docs)

$db_info = content_database_info($field);

#
severity: criticalLine 231: hook no longer exists, use hook_form_alter() to swap your own validation handler (Drupal Docs)

$db_info = content_database_info($field);
__________________________________________________

content_database_info() is defined in content.module, and is not an attempt to call the deprecated hook_info

CommentFileSizeAuthor
#4 coder_307010.patch672 bytesstella
#3 307010.patch612 bytesdouggreen
#1 307010.patch610 bytesdouggreen

Comments

douggreen’s picture

Status: Active » Needs review
StatusFileSize
new610 bytes

Please test this patch, which should fix the warning (although I haven't tested it).

stella’s picture

Status: Needs review » Needs work

This doesn't fix the issue. Either change the "#not" to "#never" or expand on the #value regex to include more of the pattern before "_info" so it can be included in the value passed to the #not regex.

Cheers,
Stella

douggreen’s picture

Status: Needs work » Needs review
StatusFileSize
new612 bytes

Right, thanks

stella’s picture

StatusFileSize
new672 bytes

No, that still doesn't work. There's two things wrong. First of all the #value line has changed but there's no +/- lines in the patch for this change. Secondly the \w+ doesn't match the [\s\(] required at the beginning of the #not regex.

Here's another patch which attempts to fix this.

Cheers,
Stella

hailu’s picture

Status: Needs review » Reviewed & tested by the community

I tried stella's latest patch, and with it cleanly applied to coder_6x.inc. a review of imagefield module did not return the error regarding invalid use of the deprecated hook_info, when it was really seeing content_database_info() which is defined in content.module

douggreen’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

While I suspect that rule works just fine, I'm uncomfortable changing 5.x->6.x rules anymore.