[PHPLIB] subclassing Table From: Valery Zamarayev (qd <email protected>)
Date: 12/01/99

Hi !

PHPLib-7.2 + PHP-3.0.13-dev + Apache_1.3.9 + MySQL-3.22.27 on FreeBSD-2.2.8

1. I tried to set $debug=1 in my script and got errors:
Call to unsupported or undefined function print_array() in ...
It seems the guys forgot to write $this->print_array(...) insted of
simply print_array(...) in table.inc at lines 806 and 849.

2. What's wrong with this code:

   class Table_Sections extends Table {
      function table_row($row, $row_key, $data, $class="") {
          global $sess;
          $cell = 0;
          $d = $this->select_colnames($data);
          $this->$table_row_open($row, $d, $class); # I GET ERROR HERE !!!
          # I customize output of cell content
          printf (" <td%s><a href=\"%s\">%s</a></td>\n",
              $class?" class=$class":"", $sess->self_url().$sess->add_query(
                   array("section_id"=>$data["section_id"])),
              $data["session_name"] );
          $this->$table_row_close();
       }
   }

I get the following:

Fatal error: Call to unsupported or undefined function () in
                                                                                                                                                                                                                        ^^^^
/var/www/site/data/operator/catalog.php3 on line 10

line 10 is '$this->$table_row_open(.....);'
what is 'undefined function ()' ? where is the bug ?

Thanks in advance to all who can point me in the right direction.

-- 
Sincerely etc.  Valery Zamarayev 
http://www.sea.com.ua
-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.