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 7552047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:39:36+00:00 2026-05-30T10:39:36+00:00

When I try to bind overloaded property in PDOStatement::bindParam method, $stmt->bindParam(‘:’.$field.”, $this->$field, $pdoparam); …

  • 0

When I try to bind overloaded property in PDOStatement::bindParam method,

$stmt->bindParam(':'.$field.'', $this->$field, $pdoparam);
...

public function __get($param)
    {
        if(isset($this->$param))
            return $this->$param;
    }

I get a notice

Notice: Indirect modification of overloaded property Msgs::$posttime has no effect in ...

After some research I found a bug report about the similar problem at php.net. The proposed solution is to add a & before __get definition.

&__get(...

But when I try to do that I get another notice

Notice: Only variable references should be returned by reference in ...

PHP version is 5.3.8.

Is there any solution to this problem?

  • 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-30T10:39:38+00:00Added an answer on May 30, 2026 at 10:39 am

    PDOStatement::bindParam requires a reference and potentially modifies the argument that was passed to it (converts it to the most appropriate type, or writes the result to it if it’s an OUT/INOUT parameter).

    PDOStatement::bindValue doesn’t take a reference and doesn’t modify the argument.

    __get returns the value of $this->$param but doesn’t actually make it a reference to the $this->$param, and making a reference to the returned value produces this notice. It is not specific to PDO, even a simple $x =& $this->$param will trigger the same notice. Use bindValue instead of bindParam to avoid this.

    Some more explanation about a non-reference __get: https://stackoverflow.com/a/5337433/1233508

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

Sidebar

Related Questions

I try to bind value from input select to attribute selectedValue in controller. This
I'm having an issue when I try to bind a visibility property to a
im new to wpf and try to bind the Items.Count Property of a static
I try to bind an IPv6 server socket in Java 1.6 on Windows 7,
When I try to bind port 80 to a socket in c, i always
I am try to bind the dropdowmlist using jquery. But is showing some error.
I'm trying to bind a function with a non-existent class. I will try to
Try loading this normal .jpg file in Internet Explorer 6.0. I get an error
My controller calls a repository class method on insert, [AcceptVerbs(HttpVerbs.Post)] public ActionResult Create([Bind(Exclude =
I get this error when I try to import ssrc.spread : ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/ssrc/_spread.so, 2):

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.