Strict warning: Declaration of date_handler_field_multiple::pre_render() should be compatible with views_handler_field::pre_render($values) in views_include_handler() (line 76 of sites/all/modules/views/includes/handlers.inc).

CommentFileSizeAuthor
#1 date-1948238-1-fix-warning.patch543 bytesmikeytown2

Comments

mikeytown2’s picture

Version: 6.x-2.9 » 6.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new543 bytes
akosipax’s picture

Issue summary: View changes

After applying the patch in comment #61 here https://www.drupal.org/node/893128, the patch here should no longer be necessary.

roball’s picture

Status: Needs review » Reviewed & tested by the community

@akosipax: I do have the patch #61 from #893128: Fix E_STRICT notices - method declaration compatibility with init(), pre_render(), _validate() and _submit() with PHP 5.4.x applied to Views 6.x-2.18, which in fact fixes many "Declaration of ... should be compatible with ..." errors.

However, I was still getting the error

Declaration of date_handler_field_multiple::pre_render() should be compatible with views_handler_field::pre_render(&$values) in /etc/drupal6/all/modules/date/date/date_handler_field_multiple.inc on line 185.

with Date 6.x-2.10. Applying mikeytown2 's patch #1 from this report does fix the error! So, both patches are required.

roball’s picture

Status: Reviewed & tested by the community » Fixed

UPDATE:

The error came back after applying patch #4 from #2327005: E_STRICT compliance to CCK 6.x-3.0-alpha3+13-dev.

Thus, no patch should be applied to Date 6.x-2.10! The fix is to patch CCK.

Status: Fixed » Closed (fixed)

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

michelle’s picture

For anyone else that is confused by #4, it turns out there is a layer of class hierarchy between Date and Views provided by CCK and this bit of the patch takes care of making CCK match both Date and Views:

- function pre_render($values) {
+ function pre_render(&$values) {

Steel Rat’s picture

Sorry, still confused.

Server was upgraded to PHP and MySQL 5.5, been updating all my drupal sites since then. One in particular is giving this error: Declaration of date_handler_field_multiple...

So, what do I need to patch?

;)

michelle’s picture

Steel Rat: You need to patch CCK since that is where the actual error is. The patch is in https://www.drupal.org/node/2327005 .

Steel Rat’s picture

Thanks Michelle.

Another question, I rarely patch, and usually do so manually because I don't have shell access to the server.

Is there a way I can patch locally on my PC? Then upload the patched files back to the server? Some of these patches are just too extensive to do manually.

Many thanks!

michelle’s picture

We use a git workflow so that the patching is done locally and then the changes are pushed to dev/test/prod. If you aren't using version control, you can just use an FTP program to overwrite the files on prod with the patched version. Make sure you keep a note of which patches you've applied so you don't overwrite them with updates.

Steel Rat’s picture

Which application would I use on a windows machine to run a patch?

michelle’s picture

I don't use Windows for web development. Try something from here: https://www.drupal.org/node/60179

SeanA’s picture

Status: Closed (fixed) » Closed (works as designed)

This wasn't actually "fixed" because it wasn't actually a problem. No patch was committed here.