for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* Provides a GoogleMap() function to DataObject objects.
*
* @author Uncle Cheese
* @package mappable
*/
class MappableDataObjectSet extends Extension
{
/**
* Optional template values for the map info windows.
private $MarkerTemplateValues = null;
* Pass through values to the markers so that when rendering the map info windows, these
* parameters are available to the template. This is of course optional.
* @param array $values hash array of template key to template value
public function setMarkerTemplateValues($values)
$this->MarkerTemplateValues = $values;
}
public function getRenderableMap($width = null, $height = null)
$gmap = MapUtil::get_map($this->owner, $this->MarkerTemplateValues);
$this->owner
object<SS_Object>
object<SS_List>
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);
$w = $width ? $width : MapUtil::$map_width;
$h = $height ? $height : MapUtil::$map_height;
$gmap->setSize($w, $h);
return $gmap;
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: