New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP code generated by Umple causes recursion error #1037

Open
jopotochny opened this Issue Apr 5, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@jopotochny

Brief Description

When an Instructor object is created, a "Nesting level too deep - recursive dependency?" error is produced. The problem line appears to be in the "equals" method of the Instructor class.

Minimum Steps to Reproduce

Steps to reproduce error: 3

  1. Generate the PHP classes from the "Model" umple file provided.
  2. Import the necessary classes generated by umple (Department.php, Instructor.php, Course.php) and import the "Persistence" file, which stores a Department object in a txt file.
  3. Run the "ProblemFile" file as a PHP script, and the error should be produced.

I am using Windows 10, and PHP 5.6
Model.txt
Persistence.txt
ProblemFile.txt

Expected Result

An Instructor object is created.

Actual Result

"Nesting level too deep - recursive dependency?" error is produced.

Build Log Output:
PHP Fatal error: Nesting level too deep - recursive dependency? in C:\Users\josep\workspacephp321\ECSE321SemesterProjectPHP\model\Instructor.php on line 262
PHP Stack trace:
PHP 1. {main}() C:\Users\josep\workspacephp321\ECSE321SemesterProjectPHP\controller\newfile.php:0
PHP 2. Instructor->__construct() C:\Users\josep\workspacephp321\ECSE321SemesterProjectPHP\controller\newfile.php:19
PHP 3. Instructor->setDepartment() C:\Users\josep\workspacephp321\ECSE321SemesterProjectPHP\model\Instructor.php:43
PHP 4. Department->addInstructor() C:\Users\josep\workspacephp321\ECSE321SemesterProjectPHP\model\Instructor.php:255
PHP 5. Department->indexOfInstructor() C:\Users\josep\workspacephp321\ECSE321SemesterProjectPHP\model\Department.php:354
PHP 6. Instructor->equals() C:\Users\josep\workspacephp321\ECSE321SemesterProjectPHP\model\Department.php:168

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment