Skip to content

Commit

Permalink
Merge pull request #145 from netniV/Issue-144
Browse files Browse the repository at this point in the history
Fix string assert() calls which breaks PHP 7.2
  • Loading branch information
howardjones authored Jul 23, 2018
2 parents fab3255 + 19b27be commit ce885bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions lib/Weathermap/Core/Map.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,10 @@ private function reset()
$this->createDefaultLinks();
$this->createDefaultNodes();

assert('is_object($this->nodes[":: DEFAULT ::"])');
assert('is_object($this->links[":: DEFAULT ::"])');
assert('is_object($this->nodes["DEFAULT"])');
assert('is_object($this->links["DEFAULT"])');
assert(is_object($this->nodes[":: DEFAULT ::"]));
assert(is_object($this->links[":: DEFAULT ::"]));
assert(is_object($this->nodes["DEFAULT"]));
assert(is_object($this->links["DEFAULT"]));

$this->imap = new HTMLImagemap('weathermap');

Expand Down Expand Up @@ -424,7 +424,7 @@ public function processString($input, &$context, $includeNotes = true, $multilin
}

// $theItem = null;
// assert('is_scalar($input)');
// assert(is_scalar($input));

$contextType = $this->getProcessStringContextName($context);

Expand Down
2 changes: 1 addition & 1 deletion lib/Weathermap/Core/MapDataItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ private function resetNormalObject()
public function copyFrom(&$source)
{
MapUtility::debug("Initialising %s $this->name from $source->name\n", $this->myType());
assert('is_object($source)');
assert(is_object($source));

foreach (array_keys($this->inheritedFieldList) as $fld) {
if ($fld != 'template') {
Expand Down
4 changes: 2 additions & 2 deletions lib/Weathermap/Core/MapNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -1059,8 +1059,8 @@ private function drawArtificialIconNINK($iconImageRef, $finalInkColour, &$map)
$col1 = $this->colours[OUT];
$col2 = $this->colours[IN];

assert('!is_null($col1)');
assert('!is_null($col2)');
assert(!is_null($col1));
assert(!is_null($col2));

imagefilledarc(
$iconImageRef,
Expand Down

0 comments on commit ce885bf

Please sign in to comment.