This is a small patch against 6.x-3.x to some views handler declarations, to prevent the warnings below when in an E_STRICT environment, such as PHP 5.4.
As necessity and opportunity allow, I hope to keep this this comprehensive and freshly rolled. I encourage others to post additional patches here, if they find further E_STRICT warnings, wherever they may be.
content_handler_field::element_type() should be compatible with views_handler_field::element_type($none_supported = false, $default_empty = false, $inline = false) in cck\includes\views\handlers\content_handler_field.inc on line 228.
Declaration of content_handler_field_multiple::query() should be compatible with views_handler_field::query($group_by = false) in cck\includes\views\handlers\content_handler_field_multiple.inc on line 321.
Declaration of content_handler_field_multiple::pre_render() should be compatible with views_handler_field::pre_render(&$values) in cck\includes\views\handlers\content_handler_field_multiple.inc on line 321.
Declaration of content_handler_field_multiple::element_type() should be compatible with content_handler_field::element_type($none_supported = false, $default_empty = false, $inline = false) in cck\includes\views\handlers\content_handler_field_multiple.inc on line 321.
Comment | File | Size | Author |
---|---|---|---|
#26 | cck-e_strict-2327005-26.patch | 2.85 KB | SeanA |
Comments
Comment #1
mw4ll4c3 CreditAttribution: mw4ll4c3 commentedComment #2
mw4ll4c3 CreditAttribution: mw4ll4c3 commentedComment #3
mw4ll4c3 CreditAttribution: mw4ll4c3 commentedComment #4
mw4ll4c3 CreditAttribution: mw4ll4c3 commentedComment #5
SeanA CreditAttribution: SeanA commentedThank you, patch in #4 fixes these warnings. Patch applied to CCK 6.x-2.9 succeeded with offsets.
Comment #6
mw4ll4c3 CreditAttribution: mw4ll4c3 commentedComment #7
roball CreditAttribution: roball commentedThank you mw4ll4c3 for the patch #4. I can confirm it fixes the error
with CCK 6.x-3.0-alpha3+13-dev.
Comment #8
MichelleI'm working off the 2.x branch and, even though the existing patch applied cleanly, I'm not so sure making a new patch off the wrong branch is a good idea so I'm just going to attach the interdiff for my addition.
This is to fix:
Strict warning: Only variables should be passed by reference in content_field_edit_form_validate() (line 1282 of /sites/all/modules/cck/includes/content.admin.inc).
Comment #9
DamienMcKennaComment #10
DamienMcKennaClosed a duplicate: #1962718: Strict warning: Declaration should be compatible
Comment #11
DamienMcKennaFYI the patch still applies to the current 6.x-2.x.
Comment #12
DamienMcKennaClosed a duplicate: #1463452: PHP 5.3 E_STRICT warning - declaration compatibility
Comment #13
Albert Volkman CreditAttribution: Albert Volkman commented+1 for RTBC
Comment #14
goldlilys CreditAttribution: goldlilys commented+1 for #4 patch
Comment #15
MichelleI took the patch from #4 and added in my changes in #8 and made a combined patch against the 3.x branch.
Comment #16
mw4ll4c3 CreditAttribution: mw4ll4c3 commentedThank you for the formal patch. I've been using your change for a while, and confirm Patch #15 applies cleanly against 6.x-3.x
Not worth holding anything up, but: looking at that change again, I'm curious if the sequence couldn't just be
or even just
$default_value = reset($form_values['default_value_widget']);
Comment #17
roball CreditAttribution: roball commentedComment #18
joachim CreditAttribution: joachim commentedI can confirm that this patch also applies to 2.x, with slight fuzz.
Comment #19
dawehnerWorks for me, thank you! Note https://www.drupal.org/node/2411093#comment-10304311 ... so the
$group_by = FALSE
change is not necessarily required.Comment #20
Steel Rat CreditAttribution: Steel Rat commentedI installed the 6.x.3.x alpha version, and made the patches in the head post, but I still get the date handler error from this thread: https://www.drupal.org/node/1948238
I was instructed to patch CCK from here since that's where the actual error is. Didn't help.
The upgrade to PHP and MySQL 5.5 has just been a disaster.
Comment #21
DamienMcKennaSteel Rat: You need to patch CCK and Views too, and look through the list of PHP 5.4 and PHP 5.5 issues for other patches to apply.
Comment #22
Steel Rat CreditAttribution: Steel Rat commentedThanks Damien, but I'm thinking running a literal patchwork system is not a good idea.
I'll have to try to upgrade to D7 this weekend for one of my sites in particular that I use at work. But even then some of the modules I need are still in alpha. Frustrating.
Comment #23
roball CreditAttribution: roball commented@Steel Rat: rather than patching all D6 core modules having PHP 5.4 E_STRICT issues, I would recommend to just apply the one patch #1954296: Restore original D6 behaviour to prevent logging E_STRICT warnings.
Comment #24
Steel Rat CreditAttribution: Steel Rat commented@roball
Done, thanks!
Comment #25
roball CreditAttribution: roball commentedComment #26
SeanA CreditAttribution: SeanA commentedPer dawehner at #19, this is not necessary:
Because the patch for Views over there does this:
This patch is identical to the last patch, without the
$group_by = false
part. Applies to both 6.x-2.x and 6.x-3.x.Comment #27
jwilson3Confirming that #26 is the right approach. RTBC.
Comment #28
budalokko CreditAttribution: budalokko commentedPatch in #26 worked for me on CCK 6.x-2.10 and removed message in PHP 5.6.
Comment #29
mw4ll4c3 CreditAttribution: mw4ll4c3 commentedComment #30
osopolarBTW: Fixed for 6.x-2.x, Release 6.x-2.11.