for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
class ThickBox extends Object
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
public static function include_code()
Requirements::javascript('thickbox/javascript/jquery.thickbox.js');
Requirements::css('thickbox/css/thickbox.css');
}
public static function block()
Requirements::block('thickbox/javascript/jquery.thickbox.js');
'thickbox/javascript/jquery.thickbox.js'
string
object<unknown_type>
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example:
function acceptsInteger($int) { } $x = '123'; // string "123" // Instead of acceptsInteger($x); // we recommend to use acceptsInteger((integer) $x);
Requirements::block('thickbox/css/thickbox.css');
'thickbox/css/thickbox.css'
public static function setAlternativeLoadingImage($location = "thickbox/images/loading.gif")
Requirements::customScript('var tb_pathToImage = "'.$location.'";');
'var tb_pathToImage = "' . $location . '";'
object<The>
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.