• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Extend Bytes Exhausted

silence

Well-known member
#1
So I'm extending XenForo_Model_Post and simply using this function:
Code:
    public function getPostById($postId, array $fetchOptions = array())
    {
        $parent = self::getPostById($postId, $fetchOptions);

        return $parent;
    }
However when I click the post number in the thread, it spits out this error:
Code:
Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 130968 bytes)
What would be triggering an exhaustion of memory and how can I code around this?

Thanks!
 

AlexT

Well-known member
#3
Instead of

PHP:
$parent = self::getPostById($postId, $fetchOptions);
try

PHP:
$parent = parent::getPostById($postId, $fetchOptions);
Unless your goal was to create an endless loop ;)