Skip to content

Commit 4bcd0cd

Browse files
authored
Merge pull request #30 from dereuromark/bugfix-empty
Fix espacing
2 parents 277aa9f + a6e9e69 commit 4bcd0cd

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ php:
1010
env:
1111
matrix:
1212
- DB=mysql db_dsn='mysql://[email protected]/cakephp_test'
13-
- DB=pgsql db_class='Cake\Database\Driver\Postgres' db_dsn='postgres://[email protected]/cakephp_test' db_database='cakephp_test' db_username='travis' db_password=''
13+
- DB=pgsql db_dsn='postgres://[email protected]/cakephp_test'
1414
global:
1515
- DEFAULT=1 CI=1
1616

@@ -28,7 +28,7 @@ before_script:
2828
- composer self-update
2929
- composer install --prefer-source --no-interaction --dev
3030

31-
- if [[ $DB = 'mysql' ]]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi
31+
- if [[ $DB = 'mysql' ]]; then mysql -u root -e 'CREATE DATABASE cakephp_test;'; fi
3232
- if [[ $DB = 'pgsql' ]]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi
3333

3434
- if [[ $PHPCS != 1 ]]; then composer require phpunit/phpunit:"<6.0"; fi

src/View/Helper/GoogleMapHelper.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,9 @@ public function staticMap(array $options = [], array $attributes = []) {
13761376
$defaultAttributes = ['alt' => __d('tools', 'Map')];
13771377
$attributes += $defaultAttributes;
13781378

1379-
return $this->Html->image($this->staticMapUrl($options), $attributes);
1379+
// This was fixed in 3.5.1 to auto-escape URL query strings for security reasons
1380+
$escape = version_compare(Configure::version(), '3.5.1') < 0 ? true : false;
1381+
return $this->Html->image($this->staticMapUrl($options + ['escape' => $escape]), $attributes);
13801382
}
13811383

13821384
/**
@@ -1395,7 +1397,7 @@ public function staticMapLink($title, array $mapOptions = [], array $linkOptions
13951397
* Creates a URL to a plain image map.
13961398
*
13971399
* Options:
1398-
* - escape: defaults to true
1400+
* - escape: defaults to true (Deprecated as of CakePHP 3.5.1 and now has to be always false)
13991401
*
14001402
* @param array $options
14011403
* - see staticMap() for details

0 commit comments

Comments
 (0)