ワードプレスの更新中にこのようなメッセージがでてサイトへアクセスが出来なくなりました。
現在のバージョンはPHP5.3.3
###発生している問題・エラーメッセージ
Parse error: syntax error, unexpected '[', expecting ')' in /home//.com/public_html/ppc/wp-content/plugins/timeline-express/lib/classes/usage-tracking/vendor/keen-io/keen-io/src/Client/Resources/keen-io-3_0.php on line 129
###該当のソースコード
<?php return array( 'name' => 'KeenIO', 'apiVersion' => '3.0', 'operations' => array( 'getResources' => array( 'uri' => '/', 'description' => 'Returns the available child resources. Currently, the only child resource is the Projects Resource.', 'httpMethod' => 'GET', 'parameters' => array( 'masterKey' => array( 'location' => 'header', 'description' => 'The Master Api Key', 'sentAs' => 'Authorization', 'pattern' => '/^([[:alnum:]])+$/', 'type' => 'string', 'required' => true, ), ), ), 'createProject' => array( 'uri' => 'organizations/{organizationId}/projects', 'description' => 'Creates a project for the specified organization and returns the project id for later usage.', 'httpMethod' => 'POST', 'parameters' => array( 'organizationKey' => array( 'location' => 'header', 'description' => 'The Organization Key.', 'sentAs' => 'Authorization', 'pattern' => '/^([[:alnum:]])+$/', 'type' => 'string', 'required' => true, ), 'project_data' => array( 'location' => 'body', 'type' => 'array', 'filters' => array('json_encode'), ), ), ), 'getProjects' => array( 'uri' => 'projects', 'description' => 'Returns the projects accessible to the API user, as well as links to project sub-resources for discovery.', 'httpMethod' => 'GET', 'parameters' => array( 'masterKey' => array( 'location' => 'header', 'description' => 'The Master API Key.', 'sentAs' => 'Authorization', 'pattern' => '/^([[:alnum:]])+$/', 'type' => 'string', 'required' => true, ), ), ), 'getProject' => array( 'uri' => 'projects/{projectId}', 'description' => 'GET returns detailed information about the specific project, as well as links to related resources.', 'httpMethod' => 'GET', 'parameters' => array( 'masterKey' => array( 'location' => 'header', 'description' => 'The Master API Key.', 'sentAs' => 'Authorization', 'pattern' => '/^([[:alnum:]])+$/', 'type' => 'string', 'required' => true, ), ), ), 'getSavedQueries' => array( 'uri' => 'projects/{projectId}/queries/saved', 'description' => 'Returns the saved queries accessible to the API user on the specified project.', 'httpMethod' => 'GET', 'parameters' => array( 'masterKey' => array( 'location' => 'header', 'description' => 'The Master API Key.', 'sentAs' => 'Authorization', 'pattern' => '/^([[:alnum:]])+$/', 'type' => 'string', 'required' => true, ), ), ), 'getSavedQuery' => array( 'uri' => 'projects/{projectId}/queries/saved/{query_name}', 'description' => 'Returns the detailed information about the specified query, as well as links to retrieve results.', 'httpMethod' => 'GET', 'parameters' => array( 'masterKey' => array( 'location' => 'header', 'description' => 'The Master API Key.', 'sentAs' => 'Authorization', 'pattern' => '/^([[:alnum:]])+$/', 'type' => 'string', 'required' => true, ), 'query_name' => array( 'location' => 'uri', 'description' => 'The saved query.', 'required' => true, ), ), ), 'createSavedQuery' => array( 'uri' => 'projects/{projectId}/queries/saved/{query_name}', 'description' => 'Creates the described query.', 'httpMethod' => 'PUT', 'parameters' => array( 'masterKey' => array( 'location' => 'header', 'description' => 'The Master API Key.', 'sentAs' => 'Authorization', 'pattern' => '/^([[:alnum:]])+$/', 'type' => 'string', 'required' => true, ), 'query_name' => array( 'location' => 'uri', 'description' => 'The desired name of the query.', 'filters' => array(["method" => '\KeenIO\Client\KeenIOClient::cleanQueryName', "args" => ["@value"]]), 'required' => true, ),
###解決したいこと。
129行目は下記のようになります。
'filters' => array(["method" => '\KeenIO\Client\KeenIOClient::cleanQueryName', "args" => ["@value"]]),
どのようにコードをなおせばよいのでしょうか?
知識がないのでこのような質問で申し訳ございません。
説明不足があるようでしたらご了承ください。
回答1件
あなたの回答
tips
プレビュー