|
Hi all,
I get a lot of notices like this: Notice: Only variable references should be returned by reference in D:\web\localhost\indsigt\private\lib\ZendFramework-0.1.3-trunk\Zend\Pdf\ Element\Reference.php on line 207 When I run this code with the newest code from SVN: $fileName='./private/app/ftemplate.pdf'; $pdf = Zend_Pdf::load($fileName); Any good reason for that? /ASger > -----Oprindelig meddelelse----- > Fra: Nicolae Namolovan [mailto:[hidden email]] > Sendt: 29. juni 2006 13:59 > Til: [hidden email] > Emne: [fw-general] Zend_Db_Table->Insert, column name with > underscore problem > > class ServersTable extends Zend_Db_Table { > protected $_name = 'servers'; > } > > $dbIns = array( > 'name'=>'sdf', > 'os_ver'=>'2' > ); > > $table = new ServersTable(); > $id = $table->insert($dbIns); > > I get the follow error: "Fatal error: Uncaught exception > 'PDOException' with message 'SQLSTATE[HY093]: Invalid parameter > number: parameter was not defined' in > ..\Zend\Db\Adapter\Abstract.php:157" > > This is because placeholders underscores are removed (in > Db\Adapter\Abstract.php:124) > // build the statement > $sql = "INSERT INTO $table " > . '(' . implode(', ', $cols) . ') ' > . 'VALUES (:' . str_replace("_", "", implode(', > :', $cols)) . ')'; > > The result are: > INSERT INTO servers (name, os_ver) VALUES (:name, :osver) > > My $dbIns don't contain any "osver" key, only "os_ver". > That's why I get the PDO exception.. > > What is the solution to this problem ? > > -- > Best regards, > Namolovan Nicolae. > This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange. For more information, connect to http://www.f-secure.com/ |
|
Asger,
Alexander is reviewing this now and will respond shortly. --j On 6/29/06 6:05 AM, "Asger Hallas" <[hidden email]> wrote: > Hi all, > > I get a lot of notices like this: > > Notice: Only variable references should be returned by reference in > D:\web\localhost\indsigt\private\lib\ZendFramework-0.1.3-trunk\Zend\Pdf\ > Element\Reference.php on line 207 > > When I run this code with the newest code from SVN: > > $fileName='./private/app/ftemplate.pdf'; > $pdf = Zend_Pdf::load($fileName); > > Any good reason for that? > > /ASger > > >> -----Oprindelig meddelelse----- >> Fra: Nicolae Namolovan [mailto:[hidden email]] >> Sendt: 29. juni 2006 13:59 >> Til: [hidden email] >> Emne: [fw-general] Zend_Db_Table->Insert, column name with >> underscore problem >> >> class ServersTable extends Zend_Db_Table { >> protected $_name = 'servers'; >> } >> >> $dbIns = array( >> 'name'=>'sdf', >> 'os_ver'=>'2' >> ); >> >> $table = new ServersTable(); >> $id = $table->insert($dbIns); >> >> I get the follow error: "Fatal error: Uncaught exception >> 'PDOException' with message 'SQLSTATE[HY093]: Invalid parameter >> number: parameter was not defined' in >> ..\Zend\Db\Adapter\Abstract.php:157" >> >> This is because placeholders underscores are removed (in >> Db\Adapter\Abstract.php:124) >> // build the statement >> $sql = "INSERT INTO $table " >> . '(' . implode(', ', $cols) . ') ' >> . 'VALUES (:' . str_replace("_", "", implode(', >> :', $cols)) . ')'; >> >> The result are: >> INSERT INTO servers (name, os_ver) VALUES (:name, :osver) >> >> My $dbIns don't contain any "osver" key, only "os_ver". >> That's why I get the PDO exception.. >> >> What is the solution to this problem ? >> >> -- >> Best regards, >> Namolovan Nicolae. >> > ########################################### > > This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange. > For more information, connect to http://www.f-secure.com/ > |
|
In reply to this post by Asger Hallas-2
I created
http://framework.zend.com/issues/browse/ZF-160 On your behalf so this isn't lost. Alex has it assigned to him for review. --j On 6/29/06 6:05 AM, "Asger Hallas" <[hidden email]> wrote: > > I get a lot of notices like this: > > Notice: Only variable references should be returned by reference in > D:\web\localhost\indsigt\private\lib\ZendFramework-0.1.3-trunk\Zend\Pdf\ > Element\Reference.php on line 207 > > When I run this code with the newest code from SVN: > > $fileName='./private/app/ftemplate.pdf'; > $pdf = Zend_Pdf::load($fileName); > > Any good reason for that? |
|
In reply to this post by Jayson Minard (ZF)
Just fixed this.
With best regards, Alexander Veremyev. Jayson Minard wrote: > Asger, > > Alexander is reviewing this now and will respond shortly. > > --j > > > On 6/29/06 6:05 AM, "Asger Hallas" <[hidden email]> wrote: > > >>Hi all, >> >>I get a lot of notices like this: >> >>Notice: Only variable references should be returned by reference in >>D:\web\localhost\indsigt\private\lib\ZendFramework-0.1.3-trunk\Zend\Pdf\ >>Element\Reference.php on line 207 >> >>When I run this code with the newest code from SVN: >> >>$fileName='./private/app/ftemplate.pdf'; >>$pdf = Zend_Pdf::load($fileName); >> >>Any good reason for that? >> >>/ASger >> >> >> >>>-----Oprindelig meddelelse----- >>>Fra: Nicolae Namolovan [mailto:[hidden email]] >>>Sendt: 29. juni 2006 13:59 >>>Til: [hidden email] >>>Emne: [fw-general] Zend_Db_Table->Insert, column name with >>>underscore problem >>> >>>class ServersTable extends Zend_Db_Table { >>>protected $_name = 'servers'; >>>} >>> >>>$dbIns = array( >>> 'name'=>'sdf', >>> 'os_ver'=>'2' >>>); >>> >>>$table = new ServersTable(); >>>$id = $table->insert($dbIns); >>> >>>I get the follow error: "Fatal error: Uncaught exception >>>'PDOException' with message 'SQLSTATE[HY093]: Invalid parameter >>>number: parameter was not defined' in >>>..\Zend\Db\Adapter\Abstract.php:157" >>> >>>This is because placeholders underscores are removed (in >>>Db\Adapter\Abstract.php:124) >>> // build the statement >>> $sql = "INSERT INTO $table " >>> . '(' . implode(', ', $cols) . ') ' >>> . 'VALUES (:' . str_replace("_", "", implode(', >>>:', $cols)) . ')'; >>> >>>The result are: >>>INSERT INTO servers (name, os_ver) VALUES (:name, :osver) >>> >>>My $dbIns don't contain any "osver" key, only "os_ver". >>>That's why I get the PDO exception.. >>> >>>What is the solution to this problem ? >>> >>>-- >>>Best regards, >>>Namolovan Nicolae. >>> >> >>########################################### >> >>This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange. >>For more information, connect to http://www.f-secure.com/ >> > > > > |
| Powered by Nabble | Edit this page |
