Skip to content
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

Overriding basic services may cause unmanaged internal error #2205

Closed
kbtz opened this issue Mar 19, 2014 · 5 comments
Closed

Overriding basic services may cause unmanaged internal error #2205

kbtz opened this issue Mar 19, 2014 · 5 comments

Comments

@kbtz
Copy link

kbtz commented Mar 19, 2014

A wrong configuration in my ini file made my view service be registred within a non existing class, like this:

$di->set('view', '\Some\Missing\Class');

It seems that this can cause an unmanaged exception in phalcon 1.3.0. Beacuse an empty response is returned and apache reports something like this: [notice] child pid 28938 exit signal Segmentation fault (11).

@kbtz kbtz changed the title Empty section in INI file causing internal error Overriding basic services may cause unmanaged internal error Mar 19, 2014
@phalcon
Copy link
Collaborator

phalcon commented Mar 19, 2014

This test works fine:

[a]

[b]
hello = 1
other = "hello"
<?php

$config = new Phalcon\Config\Adapter\Ini("a.ini");
var_dump($config);
unset($config);

Produces:

object(Phalcon\Config\Adapter\Ini)#1 (2) {
  ["a"]=>
  object(Phalcon\Config)#2 (0) {
  }
  ["b"]=>
  object(Phalcon\Config)#3 (2) {
    ["hello"]=>
    string(1) "1"
    ["other"]=>
    string(5) "hello"
  }
}

Could you please submit a test that fully reproduces the problem?

@kbtz
Copy link
Author

kbtz commented Mar 19, 2014

Sorry, took me a while to debug what's was really going on. Issue updated.

@phalcon
Copy link
Collaborator

phalcon commented Mar 19, 2014

OK, confirmed

@phalcon
Copy link
Collaborator

phalcon commented Mar 19, 2014

Could you try again recompiling from master branch?

@kbtz
Copy link
Author

kbtz commented Mar 20, 2014

Tested with 8c5fa64, seems to be fixed now.

Phalcon throws:

Phalcon\DI\Exception: Service 'view' cannot be resolved

@kbtz kbtz closed this as completed Mar 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants