Home 게시판 커뮤니티 Q&A 워드프레스 구문 에러 : Parse error: syntax error, unexpected

1개 답변, 1 voice Last updated by Avatar of juuunojuuuno 6 years, 1 month 전
  • Avatar of juuunojuuuno
    Participant
    @juuuno
    #52194
    안녕하세요.

    워드프레스 구문에러가 있어서 보실 수 있으신분들께 여쭙고자 합니다.
    Parse error: syntax error, unexpected ‘$r944164’ (T_VARIABLE) in /home/ventution/public_html/wp/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 1
     
    ==============================================
     
    <?php
    /**
     * Case-insensitive dictionary, suitable for HTTP headers
     *
     * @package Requests
     * @subpackage Utilities
     */
     
    /**
     * Case-insensitive dictionary, suitable for HTTP headers
     *
     * @package Requests
     * @subpackage Utilities
     */
    class Requests_Utility_CaseInsensitiveDictionary implements ArrayAccess, IteratorAggregate {
    /**
    * Actual item data
    *
    * @var array
    */
    protected $data = array();
     
    /**
    * Creates a case insensitive dictionary.
    *
    * @param array $data Dictionary/map to convert to case-insensitive
    */
    public function __construct(array $data = array()) {
    foreach ($data as $key => $value) {
    $this->offsetSet($key, $value);
    }
    }
     
    /**
    * Check if the given item exists
    *
    * @param string $key Item key
    * @return boolean Does the item exist?
    */
    public function offsetExists($key) {
    $key = strtolower($key);
    return isset($this->data[$key]);
    }
     
    /**
    * Get the value for the item
    *
    * @param string $key Item key
    * @return string Item value
    */
    public function offsetGet($key) {
    $key = strtolower($key);
    if (!isset($this->data[$key])) {
    return null;
    }
     
    return $this->data[$key];
    }
     
    /**
    * Set the given item
    *
    * @throws Requests_Exception On attempting to use dictionary as list (invalidset)
    *
    * @param string $key Item name
    * @param string $value Item value
    */
    public function offsetSet($key, $value) {
    if ($key === null) {
    throw new Requests_Exception(‘Object is a dictionary, not a list’, ‘invalidset’);
    }
     
    $key = strtolower($key);
    $this->data[$key] = $value;
    }
     
    /**
    * Unset the given header
    *
    * @param string $key
    */
    public function offsetUnset($key) {
    unset($this->data[strtolower($key)]);
    }
     
    /**
    * Get an iterator for the data
    *
    * @return ArrayIterator
    */
    public function getIterator() {
    return new ArrayIterator($this->data);
    }
     
    /**
    * Get the headers as an array
    *
    * @return array Header data
    */
    public function getAll() {
    return $this->data;
    }
    }
    Avatar of juuunojuuuno
    Participant
    @juuuno
    #52198

    아래의 방법으로 해결하였습니다.

     

    네이버 지식인에서 워드프레스닥터님께서 답변주시기를

    해당 파일을 교체해보라하셨고

     

    문제가 있는 파일 교체  > 다른 에러 메세지 뜸 > 워드프레스 통째로 교체 > 다른 에러 메세지 뜸 > 젯팩 모듈 stats.php 교체 > 해결

     

    감사합니다.

2 글 보임 - 1에서 2 까지 (총 2 중에서)
  • 답변은 로그인 후 가능합니다.