Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6585655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:41:26+00:00 2026-05-25T16:41:26+00:00

I have made a Twitter app to simply post tweets from my web site,

  • 0

I have made a Twitter app to simply post tweets from my web site, using the “twitteroauth” and “oauth” PHP scripts here.

Everything works, but my error logs are giving me this error:

Undefined index: port OAuth.php 383

Although this doesn’t seem to be inhibiting my scripts from functioning, I’d like to keep my error logs free of noise. And avoid possible future issues.

Any idea why this is happening?

For reference the code in OAuth.php the error log is pointing to is this:

public function get_normalized_http_url() {
$parts = parse_url($this->http_url);
$port = @$parts['port'];       <-- Line 383
$scheme = $parts['scheme'];
$host = $parts['host'];
$path = @$parts['path'];
$port or $port = ($scheme == 'https') ? '443' : '80';
if (($scheme == 'https' && $port != '443')
|| ($scheme == 'http' && $port != '80')) {
$host = "$host:$port";
}
return "$scheme://$host$path";
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:41:27+00:00Added an answer on May 25, 2026 at 4:41 pm

    That is an error in the OAuth.php file, it accesses an index of an array w/o performing an index check.

    Obviously the coder/ette who wrote this was so clever-clever to use the error suppression operator @ instead of doing a proper index check – being lazy (to assume the best).

    Report this as a bug upstream, a fix is trivial:

    $parts = parse_url($this->http_url) + array('port'=>NULL, 'path'=>NULL);
    

    and removing the two @ operators.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made a Consumer key and a Consumer secret from my twitter account
I have a NSDictionary made up of the daily trend from twitter (made up
Using the Twitter Search API I have attempted to download JSON data from a
I have implemented Twitter OAuth in my web application, the web application currently fetches
I have made a debugger for the websites i develop that i simply include
I'm working on a site with a simple php-generated twitter box with user timeline
So I am making a GUI to get tweets. I have made an event
I'm a moderate to good PHP programer and have experience with terminal/shell scripts but
I have a Django app that needs to pull the follower_count information from several
Hi I've made an attempt at using Tweetsharp for a twitter application I'm building

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.