Haehnchen/idea-php-shopware-plugin

String index out of range: -2

Closed this issue · 3 comments

Hi,
I got this error:

String index out of range: -2
java.lang.StringIndexOutOfBoundsException: String index out of range: -2
	at java.lang.String.substring(String.java:1967)
	at de.espend.idea.shopware.navigation.SmartyActionGotoRelatedCollector.collectGotoRelatedItems(SmartyActionGotoRelatedCollector.java:55)
	at fr.adrienbrault.idea.symfony2plugin.dic.ControllerMethodLineMarkerProvider.getGotoRelatedItems(ControllerMethodLineMarkerProvider.java:97)
	at fr.adrienbrault.idea.symfony2plugin.dic.ControllerMethodLineMarkerProvider.collect(ControllerMethodLineMarkerProvider.java:48)
	at fr.adrienbrault.idea.symfony2plugin.dic.ControllerMethodLineMarkerProvider.collectSlowLineMarkers(ControllerMethodLineMarkerProvider.java:107)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.a(LineMarkersPass.java:212)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.a(LineMarkersPass.java:119)
	at com.intellij.codeInsight.daemon.impl.Divider.divideInsideAndOutsideInOneRoot(Divider.java:96)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.doCollectInformation(LineMarkersPass.java:106)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.d(PassExecutorService.java:438)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1161)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:431)
	at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:548)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:493)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:430)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:406)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:142)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:250)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:404)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:165)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

PHPStorm 2017.2
Shopware Plugin 2.7.5
Symfony Plugin 0.14.149

thx for reporting. this is because of supporting __invoke in Symfony plugin as controller actions. need to filter it here also. Haehnchen/idea-php-symfony2-plugin#986

done

thanks @Haehnchen 👍 I will check it out