php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62647 Example not working
Submitted: 2012-07-24 06:15 UTC Modified: 2021-08-29 04:22 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: deep at coollider dot com Assigned: cmb (profile)
Status: No Feedback Package: yaf (PECL)
PHP Version: 5.3.15 OS: Debian 6
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: deep at coollider dot com
New email:
PHP Version: OS:

 

 [2012-07-24 06:15 UTC] deep at coollider dot com
Description:
------------
Yaf example not working. I am testing default controler.

My PHP: 5.3.3-7+squeeze13 with Suhosin-Patch (cli) (built: Jun 10 2012 09:35:18) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Xdebug v2.1.2, Copyright (c) 2002-2011, by Derick Rethans
    with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH

Test script:
---------------
class IndexController extends Yaf_Controller_Abstract {
   /* default action */
   public function indexAction() {
       $this->view->word = "hello world";
   }
}

Expected result:
----------------
<html>
    <head>
        <title>Hello World</title>
    </head>
    <body>hello world</body>
</html>

Actual result:
--------------
PHP Notice:  Undefined variable: word in /var/www/localhost/re27/app/application/views/index/index.phtml on line 6
PHP Stack trace:
PHP   1. {main}() /var/www/localhost/re27/app/index.php:0
PHP   2. Yaf_Application->run() /var/www/localhost/re27/app/index.php:9
PHP   3. Yaf_View_Simple->render() /var/www/localhost/re27/app/index.php:0

<html>
    <head>
        <title>Hello World</title>
    </head>
    <body></body>
</html>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-07-26 14:44 UTC] rhofmeyr at gmail dot com
Can you post your view script?

You need to echo out $this->word in index.phtml.
 [2012-07-26 15:12 UTC] laruence@php.net
thanks , it's my fault :)
 [2012-07-29 09:30 UTC] laruence@php.net
-Assigned To: +Assigned To: laruence
 [2017-10-24 07:59 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: laruence +Assigned To:
 [2021-08-18 12:18 UTC] cmb@php.net
Is this still an issue with latest yaf (3.3.3)?
 [2021-08-18 12:18 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-08-29 04:22 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 02:02:52 2024 UTC