Commit c906d433 by AlexGx

fix php5.4 array syntax

parent 1982efbd
...@@ -239,7 +239,7 @@ class OpenId extends BaseClient implements ClientInterface ...@@ -239,7 +239,7 @@ class OpenId extends BaseClient implements ClientInterface
curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Accept: application/xrds+xml, */*')); curl_setopt($curl, CURLOPT_HTTPHEADER, ['Accept: application/xrds+xml, */*']);
if ($this->verifyPeer !== null) { if ($this->verifyPeer !== null) {
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, $this->verifyPeer); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, $this->verifyPeer);
......
...@@ -64,7 +64,7 @@ class ActiveField extends \yii\widgets\ActiveField ...@@ -64,7 +64,7 @@ class ActiveField extends \yii\widgets\ActiveField
static $counter = 0; static $counter = 0;
$this->inputOptions['class'] .= ' typeahead-' . (++$counter); $this->inputOptions['class'] .= ' typeahead-' . (++$counter);
foreach ($data as &$item) { foreach ($data as &$item) {
$item = array('word' => $item); $item = ['word' => $item];
} }
$this->form->getView()->registerJs("yii.gii.autocomplete($counter, " . Json::encode($data) . ");"); $this->form->getView()->registerJs("yii.gii.autocomplete($counter, " . Json::encode($data) . ");");
return $this; return $this;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment