2011-01-20, 08:59 PM
In one of my plugins I have a very small class defined at the bottom of the file. However, someone's reported that they get an error saying this class doesn't exist, even though it's in their copy of the file, and seems to work properly for everybody else, me included.
What could cause this to happen?? In case you don't know, a function or class doesn't have to be defined earlier in the script than when it's used, it can be defined/included anywhere and it'll work. Basically, the code is this:
Anyone have any ideas??
What could cause this to happen?? In case you don't know, a function or class doesn't have to be defined earlier in the script than when it's used, it can be defined/included anywhere and it'll work. Basically, the code is this:
<?php
// lots of code
$object = new MyClass();
// lots of code
class MyClass extends Class
{
}
?>
Anyone have any ideas??