Skip to:
Content

BuddyPress.org

Changes between Initial Version and Version 1 of Ticket #7041, comment 3


Ignore:
Timestamp:
05/25/2016 09:43:44 PM (3 years ago)
Author:
dcavins
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7041, comment 3

    initial v1  
    1 Ouch. The reason that this fails is that the sanitization callback passed into the customizer setting definition is attached to a filter in `WP_Customize_Setting::sanitize()`. That filter passes two arguments to the sanitization callback: `$value` and the instance of `WP_Customize_Setting`. Since `intval()` can accept an optional second argument (base), and `$this` is passed into it, it blows up.
     1Ouch. The reason that this fails is that the sanitization callback passed into the customizer setting definition is attached to a filter in `WP_Customize_Setting::sanitize()`. That filter passes two arguments to the sanitization callback: `$value` and the instance of `WP_Customize_Setting`. Since `intval()` can accept an optional second argument (`$base`), and `$this` is passed into it, it blows up.
    22
    33Switching to the WP function `absint()`, which is only expecting one argument, works fine though. Patch attached.