Open vickybiswas opened 7 years ago
Same problem
Same problem
ATOM: 1.27.2 x64 OS: macOS HighSierra ( OSX 10.13.5) Thrown From: php-cs-fixer package 4.1.1
Not saved and run [Package]-[php-cs-fixer]-[FIX(^⌘S
)].
<?php
echo sayHello();
function sayHello(){
return 'Hello world!';
}
TypeError: Cannot read property 'toString' of undefined
at Object.fix (/Volumes/Macintosh_SD/Users/admin/.atom/packages/php-cs-fixer/lib/php-cs-fixer.coffee:134:72)
at HTMLElement.subscriptions.add.atom.commands.add.php-cs-fixer:fix (/Volumes/Macintosh_SD/Users/admin/.atom/packages/php-cs-fixer/lib/php-cs-fixer.coffee:106:84)
at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:384:49)
at CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:273:23)
at AtomEnvironment.dispatchApplicationMenuCommand (/Applications/Atom.app/Contents/Resources/app/src/atom-environment.js:1347:25)
at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app/src/application-delegate.js:339:53)
at emitThree (events.js:116:13)
at EventEmitter.emit (events.js:197:7)
atom-autocomplete-php 0.25.6
japanese-menu 1.14.9
linter-php 1.5.1
php-cs-fixer 4.1.1
teletype 0.13.3
Same problem
Fix error messsage by setting the php path.
I have seen this issue if the php path is not set. Setting the php path in settings of this module solves the 'toString' problem.
[Enter steps to reproduce:]
Atom: 1.19.5 x64 Electron: 1.6.9 OS: Mac OS X 10.12.6 Thrown From: php-cs-fixer package 4.1.1
Stack Trace
Uncaught TypeError: Cannot read property 'toString' of undefined
Commands
Non-Core Packages