묻고답하기

설문 탭 오류

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 남기남
퍼플코드 페이지 내의 탭메뉴 링크 구현방법 [2] 2015.09.08 by 펀펀74
키무님 xe 1.8.9 재설치 문의드립니다. 도와주세요 [10] 2015.09.08 by 키무님
항상 xe로웹제작후 네이버검색등록 방법과 코드화면으로 보는법 알려주세요 [3] 2015.09.08 by purecity
은협씨 글쓰기 텍스트 상자가 사라졌어요 [3] 2015.09.08 by sejin7940
오락실주인 카카오,페북,SNS 위젯은 없나요 ?ㅁ,ㅁ [2] 2015.09.08 by 오락실주인
쉐넌 배경색상을 넣고 싶어요 [5] 2015.09.08 by 쉐넌
매튜 메인 페이지 위젯에 페이스북 페이지 삽입 [4] 2015.09.08 by 충쌤
sandcastle 게시판 글 쓴 이 클릭하면... [2] 2015.09.08 by sandcastle
andyseong539 버튼을 누르면 Err메세지가 뜨고 이동이 안됩니다. [2] file 2015.09.08 by andyseong539
will xedition 고급분들 좀 알려주세요...  
블랙캣 권한이 없으면 무조건 만들어놓은 페이지로 이동시키고 싶습니다. [1] 2015.09.08 by Double'U'
이구역고양이 xe와 관련 없는 질문일 수도 있는데..(구글 애널리틱스 질문) [1] 2015.09.08 by Gunmania
MF천월 이소스 위치가? [4] 2015.09.08 by MF천월
땅끝까지 배경화면 고정좀 도와주세요. [1] 2015.09.08 by DoorWeb
초보자 모바일에서 메인은 PC화면처럼......  
rtyyhh 카페24 쓰시는분중 파일첨부 업로드 안되시는분 필독요..  
hyeonseok 스케치북 댓글 아이피 일부 가리는 법 [1] 2015.09.07 by 후하니
yool misol's mobile board skin에서 이미지 확대  
pn**** XE를 업그레이드 할려고하는데 막힙니다. [1] 2015.09.07 by 기진곰
c2**** 페이지 내 변수 확인은 어떻게 하나요?  
쉐넌 페이지수정이 안됩니다  
mcls**** 2차메뉴 출력문제 문의드립니다/ [1] 2015.09.07 by DoorWeb
이구역고양이 네이버 애널리틱스 질문입니다! [1] 2015.09.07 by 이구역고양이
아쿠아d3033 phpmyadmin으로 회원이전작업중 확장변수입력.. [2] 2015.09.07 by 아쿠아d3033
벼리507 스케치북 게시판 사용중인데 모바일댓글도 ckeditor로 사용할수 없나요? [2] file 2015.09.07 by sejin7940
라자루스 연도가 바뀌면 날짜 표기가 변하게 하고 싶습니다. [1] 2015.09.07 by sejin7940
도로테비 메뉴를 직접 만들고 싶은데... [2] 2015.09.07 by sejin7940
xe초보자 아이콘샵의 아이콘 출력방법을 알려주세요.  
25시 스케치북 유튜브 게시판에서 유튜브 주소란에 http와 https 함께 작동시키는 방법 좀 [2] 2015.09.07 by 25시
newi 현재위치 url주소 불러오려면 ? [3] 2015.09.07 by DoorWeb