묻고답하기

설문 탭 오류

2015.09.06 16:48

윷윷

XE 관리자페이지에서 콘텐츠 설문 탭을 클릭했을대

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 85 bytes) in /web/home/adgon/html/classes/object/Object.class.php on line 151

라는 오류창이 뜨네요ㅠㅠ 어떻게 해야 할까요??

밑에는 Object.class.php 입니다!

 

<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */

/**
 * Every modules inherits from Object class. It includes error, message, and other variables for communicatin purpose.
 *
 * @author NAVER (developers@xpressengine.com)
 */
class Object
{

    /**
     * Error code. If `0`, it is not an error.
     * @var int
     */
    var $error = 0;

    /**
     * Error message. If `success`, it is not an error.
     * @var string
     */
    var $message = 'success';

    /**
     * An additional variable
     * @var array
     */
    var $variables = array();

    /**
     * http status code.
     * @var int
     */
    var $httpStatusCode = NULL;

    /**
     * Constructor
     *
     * @param int $error Error code
     * @param string $message Error message
     * @return void
     */
    function Object($error = 0, $message = 'success')
    {
        $this->setError($error);
        $this->setMessage($message);
    }

    /**
     * Setter to set error code
     *
     * @param int $error error code
     * @return void
     */
    function setError($error = 0)
    {
        $this->error = $error;
    }

    /**
     * Getter to retrieve error code
     *
     * @return int Returns an error code
     */
    function getError()
    {
        return $this->error;
    }

    /**
     * Setter to set HTTP status code
     *
     * @param int $code HTTP status code. Default value is `200` that means successful
     * @return void
     */
    function setHttpStatusCode($code = '200')
    {
        $this->httpStatusCode = $code;
    }

    /**
     * Getter to retrieve HTTP status code
     *
     * @return int Returns HTTP status code
     */
    function getHttpStatusCode()
    {
        return $this->httpStatusCode;
    }

    /**
     * Setter to set set the error message
     *
     * @param string $message Error message
     * @return bool Alaways returns true.
     */
    function setMessage($message = 'success')
    {
        if($str = Context::getLang($message))
        {
            $this->message = $str;
        }
        else
        {
            $this->message = $message;
        }

        // TODO This method always returns True. We'd better remove it
        return TRUE;
    }

    /**
     * Getter to retrieve an error message
     *
     * @return string Returns message
     */
    function getMessage()
    {
        return $this->message;
    }

    /**
     * Setter to set a key/value pair as an additional variable
     *
     * @param string $key A variable name
     * @param mixed $val A value for the variable
     * @return void
     */
    function add($key, $val)
    {
        $this->variables[$key] = $val;
    }

    /**
     * Method to set multiple key/value pairs as an additional variables
     *
     * @param Object|array $object Either object or array containg key/value pairs to be added
     * @return void
     */
    function adds($object)
    {
        if(is_object($object))
        {
            $object = get_object_vars($object);
        }

        if(is_array($object))
        {
            foreach($object as $key => $val)
            {
                $this->variables[$key] = $val;
            }
        }
    }

    /**
     * Method to retrieve a corresponding value to a given key
     *
     * @param string $key
     * @return string Returns value to a given key
     */
    function get($key)
    {
        return $this->variables[$key];
    }

    /**
     * Method to retrieve an object containing a key/value pairs
     *
     * @return Object Returns an object containing key/value pairs
     */
    function gets()
    {
        $args = func_get_args();
        $output = new stdClass();
        foreach($args as $arg)
        {
            $output->{$arg} = $this->get($arg);
        }
        return $output;
    }

    /**
     * Method to retrieve an array of key/value pairs
     *
     * @return array
     */
    function getVariables()
    {
        return $this->variables;
    }

    /**
     * Method to retrieve an object of key/value pairs
     *
     * @return Object
     */
    function getObjectVars()
    {
        $output = new stdClass();
        foreach($this->variables as $key => $val)
        {
            $output->{$key} = $val;
        }
        return $output;
    }

    /**
     * Method to return either true or false depnding on the value in a 'error' variable
     *
     * @return bool Retruns true : error isn't 0 or false : otherwise.
     */
    function toBool()
    {
        // TODO This method is misleading in that it returns true if error is 0, which should be true in boolean representation.
        return ($this->error == 0);
    }

    /**
     * Method to return either true or false depnding on the value in a 'error' variable
     *
     * @return bool
     */
    function toBoolean()
    {
        return $this->toBool();
    }

}
/* End of file Object.class.php */
/* Location: ./classes/object/Object.class.php */

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
내마음집 도메인이하 주소 url숨기는게 안되네요 도와주세요~  
셩셩이 스케치북 embed 태그 [7] 2016.05.30 by 라디요
221242 ckeditor 웹폰트 설정이 재대로 안됩니다 file  
해피지영 document_srl 12596이상부터 삭제 명령어...스팸글 삭제 방법 [4] 2016.05.30 by 해피지영
비틀즈 관리자가 아닌 특정IP만 게시글 버튼 보이게 [6] 2016.05.30 by 비틀즈
화이팅 회원가입시 전환값 스크립트 삽입???  
thdwjdtjr 로그인 접속시 닉네임으로 나타나는 것을 이름으로  
YKAL 확장변수 출력시 해당기간만 출력되는 걸 어떻게 구현해야될까요? sejin7940님 코드  
김동하123 에디터에서 여백이 안먹네요 [2] 2016.05.30 by 김동하123
태현아빠 "기본 URL 설정이 안 되어 있습니다." [5] 2016.05.30 by 미연조
홉방멘 이미지 슬라이드 위젯 왼쪽으로 쏠림 현상에 대해 [1] 2016.05.30 by DoorWeb
한글 로그인 하지 않은 사용자들의 IP로그 [2] 2016.05.30 by bluedream
웨이 board.controller.php 수정후 글쓴 후 리페이지가 안됩니다. [4] 2016.05.30 by sejin7940
김동하123 추천하였습니다. 추천할 수 없습니다. 메시지창이 갑자기 안나옵니다 file  
알짜포크 XE자료실에 있는 휴대폰문자 인증모듈 [2] 2016.05.30 by 알짜포크
thdwjdtjr 회원가입 후 로그인 시 이름으로 나타나게 하고 게시판에는 닉네임으로  
김호띠 Font Awesome Icons 사이드탭 [1] 2016.05.29 by 디자인클립
소금설탕후추 XE자료실에서 포인트 경매 모듈 질문입니다.  
zartin 신디케이션, 이거 제대로 작동되긴 되나요? [7] 2016.05.29 by 씨지크
thdwjdtjr 메인페이지에서 배경음악관련 [4] 2016.05.29 by thdwjdtjr