Hi Everyone, I was giving a project with the following
9 namespace project_name;
10
11 use project_name;
12
13 class ClassName {
14 static $instance;
15 /**
16 * Call this method to get singleton
17 *
18 * @return ...
19 */
20 public static function get_instance() {
21 if ( ! isset( self::$instance ) ) {
22 self::$instance = new self();
23 }
24
25 return self::$instance;
26 }
Line 22 fails and there are no errors. I have tried it using PHP 5.3, 5.4 and now 5.5 using both Apache 2.2 and 2.4 and it still dies on that line. Without an error, its been hard to see what's wrong. I'm on a linux machine (Elementary OS) and original developer is no longer part of the project and left without any documentation.
If I comment line 22 and simply rely on line 25, the script continues and the website loads; this is part of a custom wordpress theme. Because this custom theme is already running on other projects, I can't comment out line 22 - I need my local enviroment to work with it.
Anyone available to give me some guidance here?