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

Notice: Undefined offset: 1 in Abraham_TwitterOAuth_TwitterOAuth.php #313

Closed
fsteinbauer opened this issue Feb 13, 2015 · 4 comments
Closed

Comments

@fsteinbauer
Copy link

Hello!

I tried to include your twitter API into the CMS TYPO3 Neos, sadly following error appears:

Uncaught Exception: TYPO3\Flow\Error\Exception

Message
Notice: Undefined offset: 1 in
/var/customers/webs/jcwebsitedev/TYPO3-Neos/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Abraham_TwitterOAuth_TwitterOAuth.php
line 320

More Information
Exception code 1
File Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Error/ErrorHandler.php line 77
Reference code 201502122243224a7118

Stack trace
#0 TYPO3\Flow\Error\ErrorHandler::handleError()

/var/customers/webs/jcwebsitedev/TYPO3-Neos/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Abraham_TwitterOAuth_TwitterOAuth.php:320
#1 Abraham\TwitterOAuth\TwitterOAuth_Original::request()

/var/customers/webs/jcwebsitedev/TYPO3-Neos/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Abraham_TwitterOAuth_TwitterOAuth.php:251
#2 Abraham\TwitterOAuth\TwitterOAuth_Original::oAuthRequest()

/var/customers/webs/jcwebsitedev/TYPO3-Neos/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Abraham_TwitterOAuth_TwitterOAuth.php:222
#3 Abraham\TwitterOAuth\TwitterOAuth_Original::http()

/var/customers/webs/jcwebsitedev/TYPO3-Neos/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Abraham_TwitterOAuth_TwitterOAuth.php:177
#4 Abraham\TwitterOAuth\TwitterOAuth_Original::get()

/var/customers/webs/jcwebsitedev/TYPO3-Neos/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/acid_SocialFeed_Provider_TwitterProvider.php:34
#5 acid\SocialFeed\Provider\TwitterProvider_Original::import()

/var/customers/webs/jcwebsitedev/TYPO3-Neos/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/acid_SocialFeed_Command_SocialfeedCommandController.php:64
#6 acid\SocialFeed\Command\SocialfeedCommandController_Original::importCommand()
#7 ::call_user_func_array()

/var/customers/webs/jcwebsitedev/TYPO3-Neos/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/TYPO3_Flow_Cli_CommandController.php:240
#8 TYPO3\Flow\Cli\CommandController_Original::callCommandMethod()

/var/customers/webs/jcwebsitedev/TYPO3-Neos/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/TYPO3_Flow_Cli_CommandController.php:110
#9 TYPO3\Flow\Cli\CommandController_Original::processRequest()

/var/customers/webs/jcwebsitedev/TYPO3-Neos/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/TYPO3_Flow_Mvc_Dispatcher.php:80
#10 TYPO3\Flow\Mvc\Dispatcher_Original::dispatch()

/var/customers/webs/jcwebsitedev/TYPO3-Neos/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/TYPO3_Flow_Mvc_Dispatcher.php:298
#11 TYPO3\Flow\Mvc\Dispatcher::dispatch()
#12 ::call_user_func_array()

/var/customers/webs/jcwebsitedev/TYPO3-Neos/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/TYPO3_Flow_Mvc_Dispatcher.php:282
#13 TYPO3\Flow\Mvc\Dispatcher::Flow_Aop_Proxy_invokeJoinPoint()

/var/customers/webs/jcwebsitedev/TYPO3-Neos/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Aop/Advice/AdviceChain.php:57
#14 TYPO3\Flow\Aop\Advice\AdviceChain::proceed()

/var/customers/webs/jcwebsitedev/TYPO3-Neos/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/TYPO3_Flow_Security_Aspect_RequestDispatchingAspect.php:75
#15 TYPO3\Flow\Security\Aspect\RequestDispatchingAspect_Original::blockIllegalRequestsAndForwardToAuthenticationEntryPoints()

/var/customers/webs/jcwebsitedev/TYPO3-Neos/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Aop/Advice/AroundAdvice.php:34
#16 TYPO3\Flow\Aop\Advice\AroundAdvice::invoke()

/var/customers/webs/jcwebsitedev/TYPO3-Neos/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Aop/Advice/AdviceChain.php:55
#17 TYPO3\Flow\Aop\Advice\AdviceChain::proceed()

/var/customers/webs/jcwebsitedev/TYPO3-Neos/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/TYPO3_Flow_Mvc_Dispatcher.php:313
#18 TYPO3\Flow\Mvc\Dispatcher::dispatch()

/var/customers/webs/jcwebsitedev/TYPO3-Neos/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Cli/CommandRequestHandler.php:97
#19 TYPO3\Flow\Cli\CommandRequestHandler::handleRequest()

/var/customers/webs/jcwebsitedev/TYPO3-Neos/Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Core/Bootstrap.php:108
#20 TYPO3\Flow\Core\Bootstrap::run()

/var/customers/webs/jcwebsitedev/TYPO3-Neos/Packages/Framework/TYPO3.Flow/Scripts/flow.php:55
#21 ::require()

/var/customers/webs/jcwebsitedev/TYPO3-Neos/flow:18

@abraham
Copy link
Owner

abraham commented Feb 13, 2015

Can you replicate the error without the framework? What version of TwitterOAuth are you using?

@fsteinbauer
Copy link
Author

I doug deeper, and discovered that curl returned errorno: 77
error: Problem with the SSL CA cert (path? access rights?)

After changing TwitterOAuth.php:277 from CURLOPT_SSL_VERIFYPEER => true, to false it worked for us.

Why do you need option VERIFYPEER enabled?

@abraham
Copy link
Owner

abraham commented Feb 13, 2015

Without CURLOPT_SSL_VERIFYPEER there is no verification that connections are with Twitter. You should instead figure out what the problem is with reading cacert.pem.

@abraham abraham closed this as completed Feb 13, 2015
@fsteinbauer
Copy link
Author

I created Pull Request #315, so an exception is thrown, if there is no valid /usr/local/share/ca-certificates/cacert.pem

Repository owner locked and limited conversation to collaborators Dec 30, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants