[wp-trac] [WordPress Trac] #16746: post paginating <!--nextpage--> does not work
WordPress Trac
noreply at wordpress.org
Mon Mar 11 19:41:28 UTC 2013
#16746: post paginating <!--nextpage--> does not work
------------------------------+------------------------------
Reporter: hakre | Owner: nacin
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Awaiting Review
Component: Query | Version:
Severity: normal | Resolution:
Keywords: has-patch commit |
------------------------------+------------------------------
Comment (by toscho):
Replying to [comment:5 SergeyBiryukov]:
> One side effect is mentioned in comment:2. I agree that the current
result is not intuitive though.
But that is not true: if `<!--nextpage-->` is at the first position,
paging does not work. You get the content of all pages on one page,
because the comparison …
{{{
if ( strpos( $content, '<!--nextpage-->' ) )
}}}
… is not strict enough. There is even a
[http://www.php.net/manual/en/function.strpos.php big red warning] on the
manual for that behavior:
> This function may return Boolean `FALSE`, but may also return a non-
Boolean value which evaluates to `FALSE`. Please read the section on
Booleans for more information. Use the `===` operator for testing the
return value of this function.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16746#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list