|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-06-14 18:03 UTC] terjeto at stud dot ntnu dot no
Description:
------------
A function get_array() inside the class Foo tries to
return an array stored inside the class. This worked
fine in PHP4, but in the latest PHP5 the webpage wont
load.
Reproduce code:
---------------
class Foo {
var $array = array();
function get_array() {
return $this->array;
}
}
Expected result:
----------------
expected to see the page or at least an error message
of what the problem was.
Actual result:
--------------
the page didnt load at all. i got "page could not load"
every time. if i commented the "return ..." and
replaced it with "return true;" or anything else it
worked, but when i tried to return an array the webpage
wouldnt load at all
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 16:00:01 2025 UTC |
ok. had to run some tests and go through the smarty code, took some time. but doesnt seem to be the smarty coding itself thats the problem. and i cant reproduce a code that 'brings forth' the problem eather. im currently writing my code on a mac using BBedit, storing it on my linux server (using unix line breaks). my old code ( written on the mac, but with php 4.2.3 ) worked fine, but on php5 i get these 'random' parse errors. when i was testing the smarty code i added some print('test'); exit; lines to see where the problem could be. i was then just abt line 1000. and regulary after editing a line i for some reason got a parse error on line 2400+. all i had to do was put a empty line there. and thats not the first time something like that happens, i also have had delete a line just to write it again, exactly the same, because it caused a parse error. sorry that i cant reproduce any code with this problem.. i comes and goes as it wants on my server too.. when i was debuging the smarty code i say added a print statement at line 1090 and got "page could not load" error. after some trials i maybe found that line 1070 worked while 1071 didnt work (nb! without changing the existing line breaks). if i then added a empty line at 1071 and tried again it worked, i no longer got a "page could not load" error on that line, there where many of those. seemed like it didnt like the existing line break... ( this might be messy.. sorry )