Skip to content

Call to undefined method #1

@OscarGibson

Description

@OscarGibson

Call to undefined method lang_python_main::import()

File phpython/lang/python/python.main.php -> class lang_python_main haven't any method import.
This method call from phython/phpython.php -> class phpython -> method import.

Steps to reproduce:

  1. Clone this repository
  2. Create two files: test.py and index.php
  • test.py:
    print "hello, I'm python"
  • index.php:
    <?php
    require_once 'phpython/phpython.php';
    phpython::import('test.py');
  1. Run php index.php in console

Output from console:

PHP Fatal error: Uncaught Error: Call to undefined method lang_python_main::import() in /Users/Mac/Documents/project/Snappages/phpython/phpython/phpython.php:23
Stack trace:
#0 /Users/Mac/Documents/project/Snappages/phpython/index.php(6): phpython::import('hello.py')
#1 {main}
thrown in /Users/Mac/Documents/project/Snappages/phpython/phpython/phpython.php on line 23

Fatal error: Uncaught Error: Call to undefined method lang_python_main::import() in /Users/Mac/Documents/project/Snappages/phpython/phpython/phpython.php:23
Stack trace:
#0 /Users/Mac/Documents/project/Snappages/phpython/index.php(6): phpython::import('hello.py')
#1 {main}
thrown in /Users/Mac/Documents/project/Snappages/phpython/phpython/phpython.php on line 23

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions