S
S
Sergey Semenko2015-03-04 22:19:34
PHP
Sergey Semenko, 2015-03-04 22:19:34

Why doesn't the page load after pasting the code?

Here is the MainLocation::draw() method

public function draw() {
        foreach ($this->getMobs() as $mob) {
            $mob->draw($this);
        }

        $output = $this->getResource()->getImageBlob();
        $outputType = $this->getResource()->getFormat();
        header('Content-type: ' . $outputType);
        echo $output;
    }

And the Mob::draw() method
public function draw($location) {
        $image = new Imagick($this->getImage());
    }

So, if the $image variable is removed in the Mob::draw() method, then the code is executed, and if not, the page is not loaded at all

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Semenko, 2015-03-05
@abler98

The error came out, there was a recursion in $this->getImage()

F
FanatPHP, 2015-03-04
@FanatPHP

phpfaq.ru/debug

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question