cvs: pear /DB_DataObject_FormBuilder FormBuilder.php
| From: | Justin Patrin | Date: | Wed, 19 Jan 2005 17:42:51 +0000 |
| Subject: | cvs: pear /DB_DataObject_FormBuilder FormBuilder.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-28686@lists.php.net to get a copy of this message | ||
justinpatrin Wed Jan 19 12:42:51 2005 EDT
Modified files:
/pear/DB_DataObject_FormBuilder FormBuilder.php
Log:
Use eval for call-time-pass-by-ref to avoid the warning (bug #3230)
PHP emits the warning when the file is parsed, not when the line is run
http://cvs.php.net/diff.php/pear/DB_DataObject_FormBuilder/FormBuilder.php?r1=1.116&r2=1.117&ty=u
Index: pear/DB_DataObject_FormBuilder/FormBuilder.php
diff -u pear/DB_DataObject_FormBuilder/FormBuilder.php:1.116
pear/DB_DataObject_FormBuilder/FormBuilder.php:1.117
--- pear/DB_DataObject_FormBuilder/FormBuilder.php:1.116 Mon Jan 17 13:46:21 2005
+++ pear/DB_DataObject_FormBuilder/FormBuilder.php Wed Jan 19 12:42:50 2005
@@ -97,7 +97,7 @@
*
* @package DB_DataObject_FormBuilder
* @author Markus Wolff <mw21st@php.net>
- * @version $Id: FormBuilder.php,v 1.116 2005/01/17 18:46:21 justinpatrin Exp $
+ * @version $Id: FormBuilder.php,v 1.117 2005/01/19 17:42:50 justinpatrin Exp $
*/
// Import requirements
@@ -1016,7 +1016,7 @@
$crossLinksDo->{$crossLink['fromField']} =
$this->_do->$pk;
if (method_exists($this->_do, 'preparelinkeddataobject')) {
if ($this->useCallTimePassByReference) {
- $this->_do->prepareLinkedDataObject(&$crossLinksDo,
$key);
+
eval('$this->_do->prepareLinkedDataObject(&$crossLinksDo, $key);');
} else {
$this->_do->prepareLinkedDataObject($crossLinksDo, $key);
}
@@ -1128,7 +1128,7 @@
$tripleLinkDo->$fromField = $this->_do->$pk;
if (method_exists($this->_do, 'preparelinkeddataobject')) {
if ($this->useCallTimePassByReference) {
- $this->_do->prepareLinkedDataObject(&$tripleLinkDo,
$key);
+
eval('$this->_do->prepareLinkedDataObject(&$tripleLinkDo, $key);');
} else {
$this->_do->prepareLinkedDataObject($tripleLinkDo, $key);
}
@@ -1206,7 +1206,7 @@
$do = DB_DataObject::factory($this->reverseLinks[$key]['table']);
if (method_exists($this->_do, 'preparelinkeddataobject')) {
if ($this->useCallTimePassByReference) {
- $this->_do->prepareLinkedDataObject(&$do, $key);
+ eval('$this->_do->prepareLinkedDataObject(&$do,
$key);');
} else {
$this->_do->prepareLinkedDataObject($do, $key);
}
@@ -1643,7 +1643,7 @@
}
if (method_exists($this->_do, 'preparelinkeddataobject')) {
if ($this->useCallTimePassByReference) {
- $this->_do->prepareLinkedDataObject(&$opts, $field);
+ eval('$this->_do->prepareLinkedDataObject(&$opts,
$field);');
} else {
$this->_do->prepareLinkedDataObject($opts, $field);
}
@@ -1709,7 +1709,7 @@
{
if (method_exists($this->_do, 'pregenerateform')) {
if ($this->useCallTimePassByReference) {
- $this->_do->preGenerateForm(&$this);
+ eval('$this->_do->preGenerateForm(&$this);');
} else {
$this->_do->preGenerateForm($this);
}
@@ -1819,7 +1819,7 @@
}
if (method_exists($this->_do, 'postgenerateform')) {
if ($this->useCallTimePassByReference) {
- $this->_do->postGenerateForm(&$obj, &$this);
+ eval('$this->_do->postGenerateForm(&$obj, &$this);');
} else {
$this->_do->postGenerateForm($obj, $this);
}
@@ -2030,7 +2030,7 @@
$this->debug('<br>...processing form data...<br>');
if (method_exists($this->_do, 'preprocessform')) {
if ($this->useCallTimePassByReference) {
- $this->_do->preProcessForm(&$values);
+ eval('$this->_do->preProcessForm(&$values);');
} else {
$this->_do->preProcessForm($values);
}
@@ -2160,7 +2160,7 @@
$do->selectAdd($toField2);
if (method_exists($this->_do, 'preparelinkeddataobject')) {
if ($this->useCallTimePassByReference) {
- $this->_do->prepareLinkedDataObject(&$do,
'__tripleLink_'.$tripleLink['table']);
+ eval('$this->_do->prepareLinkedDataObject(&$do,
\'__tripleLink_\'.$tripleLink[\'table\']);');
} else {
$this->_do->prepareLinkedDataObject($do,
'__tripleLink_'.$tripleLink['table']);
}
@@ -2220,7 +2220,7 @@
}
if (method_exists($this->_do, 'preparelinkeddataobject')) {
if ($this->useCallTimePassByReference) {
- $this->_do->prepareLinkedDataObject(&$do,
'__crossLink_'.$crossLink['table']);
+ eval('$this->_do->prepareLinkedDataObject(&$do,
\'__crossLink_\'.$crossLink[\'table\']);');
} else {
$this->_do->prepareLinkedDataObject($do,
'__crossLink_'.$crossLink['table']);
}
@@ -2281,7 +2281,7 @@
$do = DB_DataObject::factory($reverseLink['table']);
if (method_exists($this->_do, 'preparelinkeddataobject')) {
if ($this->useCallTimePassByReference) {
- $this->_do->prepareLinkedDataObject(&$do, $key);
+ eval('$this->_do->prepareLinkedDataObject(&$do,
$key);');
} else {
$this->_do->prepareLinkedDataObject($do, $key);
}
@@ -2321,7 +2321,7 @@
if (method_exists($this->_do, 'postprocessform')) {
if ($this->useCallTimePassByReference) {
- $this->_do->postProcessForm(&$values);
+ eval('$this->_do->postProcessForm(&$values);');
} else {
$this->_do->postProcessForm($values);
}