We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hey,
I think my Lithium version: v0.10.0
My problem:
models: models/BlogPostsAttachment.php models/BlogPost.php
controller:
$posts = BlogPost::all( array( 'with' => array( 'BlogPostsAttachment' ) ) ); $posts = $posts -> to( 'array' );
view: var_dump( $posts['blog_posts_attachments'] ); // array( 0 => array( 'id' => NULL, 'title' => NULL ) )
var_dump( $posts['blog_posts_attachments'] ); // array( 0 => array( 'id' => NULL, 'title' => NULL ) )
Why generate this NULL item/row? The count( $posts['blog_posts_attachments'] ) is 1, but the real is 0.
If attachments is 1. The count is 1. This is okay. The problem only if empty the attachments. If empty, generate NULL array item.
Please help me. Thanks.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hey,
I think my Lithium version: v0.10.0
My problem:
models:
models/BlogPostsAttachment.php
models/BlogPost.php
controller:
view:
var_dump( $posts['blog_posts_attachments'] ); // array( 0 => array( 'id' => NULL, 'title' => NULL ) )
Why generate this NULL item/row? The count( $posts['blog_posts_attachments'] ) is 1, but the real is 0.
If attachments is 1. The count is 1. This is okay. The problem only if empty the attachments. If empty, generate NULL array item.
Please help me. Thanks.
The text was updated successfully, but these errors were encountered: