Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

require_once in PHP causes outline problems #74

Closed
DanielKimblad opened this issue Jan 11, 2017 · 1 comment
Closed

require_once in PHP causes outline problems #74

DanielKimblad opened this issue Jan 11, 2017 · 1 comment

Comments

@DanielKimblad
Copy link

DanielKimblad commented Jan 11, 2017

Details about environment
Windows 10 Pro 64

  • Brackets Version: 1.8.0-17108
  • Brackets Outline List Version: 1.00-alpha0

Other installed extensions:

  • Adobe Edge Web Fonts
  • Autosave Files on Window Blur
  • Brackets Color Palette
  • Brackets Icons
  • CodeMonkey [theme]
  • Color Highlighter
  • colorHints
  • No Distractions Advanced
  • PHP Debugger
  • PHP SmartHints
  • Special Html Characters

Example code below

<?php
require_once('includes/conf.php');
require_once('includes/class.db.php');

define('LOGS_TABLE', 'logs');

class LogHelper{
    private $db = new DB();
    public static function LogToDB($param1, $param2, $param3, $param4){
        $data = array('column1'=>$param1, 'column2'=>$param2, 'column3'=>$param3, 'column4'=>$param4);
        return $db->insert(LOGS_TABLE, $data);
    }
}
?>

What did you expect to happen? How did you expect the Outline to look?

I expected a function list containing the member function LogToDB.

What actually happened? How did the Outline actually look?

conf::php::require_once::db::php::define:: [and much more here] ::LogHelper::LogToDB()

Developer Tools Console errors:

These may be unrelated.

3/command/Menus.js:831 Error setting menu item shortcut: 1(anonymous function) @ /command/Menus.js:831
/utils/EventDispatcher.js:231 Exception in 'activeEditorChange' listener on Object TypeError: Cannot read property 'file' of null TypeError: Cannot read property 'file' of null
at file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:589:27
at t (/thirdparty/lodash.js:6:249)
at Function.eval [as findIndex] (/thirdparty/lodash.js:28:324)
at _addToMROFList (file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:588:23)
at _handleActiveEditorChange (file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:785:13)
at Object.trigger (/utils/EventDispatcher.js:229:40)
at _notifyActiveEditorChanged (/editor/EditorManager.js:161:17)
at _handleCurrentFileChange (/editor/EditorManager.js:178:9)
at Object.trigger (/utils/EventDispatcher.js:229:40)
at eval (/view/MainViewManager.js:1106:29)trigger @ /utils/EventDispatcher.js:231
/utils/EventDispatcher.js:232 Assertion failed:trigger @ /utils/EventDispatcher.js:232
/utils/EventDispatcher.js:231 Exception in 'currentFileChange' listener on Object TypeError: Cannot read property 'file' of null TypeError: Cannot read property 'file' of null
at file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:589:27
at t (/thirdparty/lodash.js:6:249)
at Function.eval [as findIndex] (/thirdparty/lodash.js:28:324)
at _addToMROFList (file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:588:23)
at handleCurrentFileChange (file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:772:10)
at Object.trigger (/utils/EventDispatcher.js:229:40)
at eval (/view/MainViewManager.js:1106:29)
at Pane.trigger (/utils/EventDispatcher.js:229:40)
at Pane._notifyCurrentViewChange (/view/Pane.js:890:14)
at Pane.showView (/view/Pane.js:1202:14)trigger @ /utils/EventDispatcher.js:231
/utils/EventDispatcher.js:232 Assertion failed:trigger @ /utils/EventDispatcher.js:232
/utils/EventDispatcher.js:231 Exception in 'activeEditorChange' listener on Object TypeError: Cannot read property 'file' of null TypeError: Cannot read property 'file' of null
at file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:561:27
at t (/thirdparty/lodash.js:6:249)
at Function.eval [as findIndex] (/thirdparty/lodash.js:28:324)
at _updateCursorPosition (file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:560:23)
at _handleActiveEditorChange (file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:789:13)
at Object.trigger (/utils/EventDispatcher.js:229:40)
at _notifyActiveEditorChanged (/editor/EditorManager.js:161:17)
at _handleCurrentFileChange (/editor/EditorManager.js:178:9)
at Object.trigger (/utils/EventDispatcher.js:229:40)
at eval (/view/MainViewManager.js:1106:29)trigger @ /utils/EventDispatcher.js:231
/utils/EventDispatcher.js:232 Assertion failed:trigger @ /utils/EventDispatcher.js:232
/utils/EventDispatcher.js:231 Exception in 'activeEditorChange' listener on Object TypeError: Cannot read property 'file' of null TypeError: Cannot read property 'file' of null
at file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:589:27
at t (/thirdparty/lodash.js:6:249)
at Function.eval [as findIndex] (/thirdparty/lodash.js:28:324)
at _addToMROFList (file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:588:23)
at _handleActiveEditorChange (file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:785:13)
at Object.trigger (/utils/EventDispatcher.js:229:40)
at _notifyActiveEditorChanged (/editor/EditorManager.js:161:17)
at _handleCurrentFileChange (/editor/EditorManager.js:178:9)
at Object.trigger (/utils/EventDispatcher.js:229:40)
at eval (/view/MainViewManager.js:1106:29)trigger @ /utils/EventDispatcher.js:231
/utils/EventDispatcher.js:232 Assertion failed:trigger @ /utils/EventDispatcher.js:232
/utils/EventDispatcher.js:231 Exception in 'currentFileChange' listener on Object TypeError: Cannot read property 'file' of null TypeError: Cannot read property 'file' of null
at file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:589:27
at t (/thirdparty/lodash.js:6:249)
at Function.eval [as findIndex] (/thirdparty/lodash.js:28:324)
at _addToMROFList (file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:588:23)
at handleCurrentFileChange (file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:772:10)
at Object.trigger (/utils/EventDispatcher.js:229:40)
at eval (/view/MainViewManager.js:1106:29)
at Pane.trigger (/utils/EventDispatcher.js:229:40)
at Pane._notifyCurrentViewChange (/view/Pane.js:890:14)
at Pane.showView (/view/Pane.js:1202:14)trigger @ /utils/EventDispatcher.js:231
/utils/EventDispatcher.js:232 Assertion failed:trigger @ /utils/EventDispatcher.js:232
/utils/EventDispatcher.js:231 Exception in 'activeEditorChange' listener on Object TypeError: Cannot read property 'file' of null TypeError: Cannot read property 'file' of null
at file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:561:27
at t (/thirdparty/lodash.js:6:249)
at Function.eval [as findIndex] (/thirdparty/lodash.js:28:324)
at _updateCursorPosition (file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:560:23)
at _handleActiveEditorChange (file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:789:13)
at Object.trigger (/utils/EventDispatcher.js:229:40)
at _notifyActiveEditorChanged (/editor/EditorManager.js:161:17)
at _handleCurrentFileChange (/editor/EditorManager.js:178:9)
at Object.trigger (/utils/EventDispatcher.js:229:40)
at eval (/view/MainViewManager.js:1106:29)trigger @ /utils/EventDispatcher.js:231
/utils/EventDispatcher.js:232 Assertion failed:trigger @ /utils/EventDispatcher.js:232
/utils/EventDispatcher.js:231 Exception in 'activeEditorChange' listener on Object TypeError: Cannot read property 'file' of null TypeError: Cannot read property 'file' of null
at file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:589:27
at t (/thirdparty/lodash.js:6:249)
at Function.eval [as findIndex] (/thirdparty/lodash.js:28:324)
at _addToMROFList (file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:588:23)
at _handleActiveEditorChange (file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:785:13)
at Object.trigger (/utils/EventDispatcher.js:229:40)
at _notifyActiveEditorChanged (/editor/EditorManager.js:161:17)
at _handleCurrentFileChange (/editor/EditorManager.js:178:9)
at Object.trigger (/utils/EventDispatcher.js:229:40)
at eval (/view/MainViewManager.js:1106:29)trigger @ /utils/EventDispatcher.js:231
/utils/EventDispatcher.js:232 Assertion failed:trigger @ /utils/EventDispatcher.js:232
/utils/EventDispatcher.js:231 Exception in 'currentFileChange' listener on Object TypeError: Cannot read property 'file' of null TypeError: Cannot read property 'file' of null
at file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:589:27
at t (/thirdparty/lodash.js:6:249)
at Function.eval [as findIndex] (/thirdparty/lodash.js:28:324)
at _addToMROFList (file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:588:23)
at handleCurrentFileChange (file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:772:10)
at Object.trigger (/utils/EventDispatcher.js:229:40)
at eval (/view/MainViewManager.js:1106:29)
at Pane.trigger (/utils/EventDispatcher.js:229:40)
at Pane._notifyCurrentViewChange (/view/Pane.js:890:14)
at Pane.showView (/view/Pane.js:1202:14)trigger @ /utils/EventDispatcher.js:231
/utils/EventDispatcher.js:232 Assertion failed:trigger @ /utils/EventDispatcher.js:232
/utils/EventDispatcher.js:231 Exception in 'activeEditorChange' listener on Object TypeError: Cannot read property 'file' of null TypeError: Cannot read property 'file' of null
at file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:561:27
at t (/thirdparty/lodash.js:6:249)
at Function.eval [as findIndex] (/thirdparty/lodash.js:28:324)
at _updateCursorPosition (file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:560:23)
at _handleActiveEditorChange (file:///C:/Program%20Files%20(x86)/Brackets/www/extensions/default/NavigationAndHistory/main.js:789:13)
at Object.trigger (/utils/EventDispatcher.js:229:40)
at _notifyActiveEditorChanged (/editor/EditorManager.js:161:17)
at _handleCurrentFileChange (/editor/EditorManager.js:178:9)
at Object.trigger (/utils/EventDispatcher.js:229:40)
at eval (/view/MainViewManager.js:1106:29)trigger @ /utils/EventDispatcher.js:231
/utils/EventDispatcher.js:232 Assertion failed:trigger @ /utils/EventDispatcher.js:232

@pelatx
Copy link
Contributor

pelatx commented Jan 12, 2017

I think the error has nothing to do with the 'require_once', but with the word 'class' in the second 'require' path.

pelatx added a commit to pelatx/brackets-outline-list that referenced this issue Jan 16, 2017
…string. (fix issue Hirse#74)

Some cleaning and renaming of variables
Hirse pushed a commit that referenced this issue Jan 22, 2017
…string. (fix issue #74)

Some cleaning and renaming of variables
@Hirse Hirse added this to the v1.0.0-alpha.1 milestone Jan 22, 2017
@Hirse Hirse closed this as completed Jan 22, 2017
pelatx added a commit to pelatx/brackets-outline-list that referenced this issue Jan 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants