🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@fabpot
Copy link
Contributor

@fabpot fabpot commented Sep 19, 2016

No description provided.

return $this->getAttribute('module_filename');
$this->filename = $filename;
foreach ($this->nodes as $node) {
if (null !== $node) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can it really be null ? This would break the contract

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parent is such an example on the main Module node. I agree that this is not great, and probably something I will fix in 2.0.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, there are more than just parent :( I will address that in another PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see #2123

$this->filename = $filename;
foreach ($this->nodes as $node) {
if (null !== $node) {
$node->setFileName($filename);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: setFilename()

@xabbuh
Copy link
Contributor

xabbuh commented Sep 19, 2016

👍 much better solution

@fabpot fabpot merged commit 4c4657a into twigphp:1.x Sep 19, 2016
fabpot added a commit that referenced this pull request Sep 19, 2016
This PR was merged into the 1.x branch.

Discussion
----------

changed the way we store node filenames

Commits
-------

4c4657a changed the way we store node filenames
@fabpot fabpot deleted the node-filename-fix branch September 19, 2016 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants