I'm seeing this on ctools ATM, in the midst of tracking it down but thought I'd ask
exception: [Deprecated] Line 1898 of includes/bootstrap.inc:
htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated
EDIT: to give more context to why I ask, is that I think happening very generically in ctools, for example:
protected function assertPluginMissingFunction($module, $type, $id, $function = 'function') {
$func = ctools_plugin_load_function($module, $type, $id, $function);
$this->assertEqual($func, NULL, t('Plugin @plugin of plugin type @module:@type for @function with missing function successfully failed.', array(
'@plugin' => $id,
'@module' => $module,
'@type' => $type,
'@function' =>$func,
)));
Where one of those @ variables in t() is being passed to check_plain as either FALSE or NULL (null in this case). There are probably more places than can be counted. I could probably cast them in the test to make it pass (because I think this is testing missing plugins)
Comments
Comment #2
joelpittetComment #7
liam morlandMerge request 1553 looks good. The others only have the tests. This will silence the deprecation messages without side-effects.
Another solution would be to add the type declaration to check_plain(). This would mean callers would have to ensure that function is only called with strings.
Comment #8
liam morlandComment #9
joseph.olstad@joel_pittet, great work, MR 1554 tests prove that we need the change.
MR !1553 has both the fix and the tests.
RTBC+
This is ready for commit
Comment #13
mcdruid commentedThank you!