Summary | Display error upon adding a contact |
Queue | Turba |
Queue Version | 2.0-RC2 |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | |
Requester | mik (at) galaxie (dot) net |
Created | 12/05/2004 (7598 days ago) |
Due | |
Updated | 12/05/2004 (7598 days ago) |
Assigned | |
Resolved | 12/05/2004 (7598 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
--- ./ObjectView.php 2004-11-17 21:36:41.000000000 +0100
+++ ./fixed/ObjectView.php 2004-12-05 00:28:19.000000000 +0100
@@ -108,7 +108,7 @@
* However, only do this on the display.php page. */
if (($attribute['type'] == 'email') &&
(basename($_SERVER['PHP_SELF']) == 'display.php')) {
- $params = array(false, false, true,
(!empty($form->_vars['name'])) ? $form->_vars['name'] : null);
+ $params = array(false, false, true,
(!empty($form->_vars->_vars['name'])) ? $form->_vars->_vars['name'] :
null);
}
$v = &$form->addVariable($attribute['label'],
'object[' . $field . ']', $attribute['type'], $attribute['required'],
$readonly, $desc, $params);
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Display error upon adding a contact
Queue ⇒ Turba
display error shows "Fatal, cannot use Variable object as array in
file ObjectView.php at line 111".
the idea is:
$form->_vars is the Variables object
$form->_vars->_vars is the actual array
The following patch fixes the problem:
*** ./ObjectView.php Wed Nov 17 21:36:41 2004
--- ./fixed/ObjectView.php Sun Dec 5 00:28:19 2004
***************
*** 109,113 ****
if (($attribute['type'] == 'email') &&
(basename($_SERVER['PHP_SELF']) == 'display.php')) {
! $params = array(false, false, true,
(!empty($form->_vars['name'])) ? $form->_vars['name'] : null);
}
--- 109,113 ----
if (($attribute['type'] == 'email') &&
(basename($_SERVER['PHP_SELF']) == 'display.php')) {
! $params = array(false, false, true,
(!empty($form->_vars->_vars['name'])) ? $form->_vars->_vars['name'] :
null);
}