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

  • Home
  • SEARCH
  • 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 7848483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:13:15+00:00 2026-06-02T18:13:15+00:00

Edit: added the PDO call. This is the actual error: Notice: Object of class

  • 0

Edit: added the PDO call.

This is the actual error:

Notice: Object of class PDOStatement could not be converted to int in Unknown on line 0

How can I in general find out which line is the correct line of the error/notice, since it is NOT line 0?

I tried using register_tick_function echoing out file:line, which does not work, because the notice is always outputted at the end of my total output.

I am looking for a general debugging way, since I could not find any error in my class of that object.

// PHP PDO Standard
$db_server = 'mysql:host='.$this->db_host.';dbname='.$this->db_dbase;
try {
  $this->db_connection = new PDO($db_server, $this->db_user, $this->db_pass);
  $pdo_set = $this->db_connection->setAttribute(PDO::ATTR_EMULATE_PREPARES, FALSE);
  $pdo_set = $this->db_connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  $pdo_set = $this->db_connection->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
  //DebugPrint($pdo_set, '$pdo_set');
} catch (PDOException $e) {
  //print 'Error!: '.$e->getMessage().'<br/>';
  die();
}
  • 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-06-02T18:13:17+00:00Added an answer on June 2, 2026 at 6:13 pm

    Finally, I found my own answer to my very own problem:

    // doing PDO-sql, inserting session data, I ran into my problem.
    $this->db_connection = new PDO(...);
    $sql_query = "INSERT INTO ".$this->session_db_table." (...) VALUES (...)";
    $sql_result = $this->db_connection->query($sql_query);
    
    // This is the line (ideally named "0") from the notice:
    return $sql_result;
    

    return $sql_result is throwing this notice:

    “Notice: Object of class PDOStatement could not be converted to int in Unknown on line 0”

    $sql_result is an object; return format expected seems to be boolean.

    So I removed this return and the notice is now gone.

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

Sidebar

Related Questions

EDIT: I added in where I create new instance of the class Process as
EDIT I added this note to explain why I keep this question here. I
EDIT : Added UL class <ul class=expand-coll-list> <li> <h4 class=title-exp-coll title-expand> <span class=exp-coll></span>Bookmarks</h4> <div
EDIT: Added the NSRunLoop from my code, as mentioned by Deepak below. This was
Edit: added some error checking code and found error '1282' is being thrown when
So I just created a textbox with JavaScript like this: EDIT: Added the len
EDIT: added code Also since the DateTimes are not really Datetimes (sTrings in hh:mm:ss
Edit: Added code (Exception on line 095, 5th time it's hit.) public DataTable ParseBarcodes(String[]
Edit: You can get the full source here: http://pastebin.com/m26693 Edit again: I added some
EDIT : Accepted answer points out what my issue was. I added another answer

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.