[wp-trac] [WordPress Trac] #62724: Fix all "Call to undefined function" direct access errors

WordPress Trac noreply at wordpress.org
Fri Dec 20 12:57:35 UTC 2024


#62724: Fix all "Call to undefined function" direct access errors
------------------------------------+------------------------------
 Reporter:  bor0                    |       Owner:  (none)
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  General                 |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------------------
Changes (by bor0):

 * keywords:   => has-patch dev-feedback


Comment:

 The attached file looks to address all the "Call to undefined function"
 issues.

 {{{
 $ patch -p0 < ~/Desktop/62724.patch
 patching file 'wp-admin/admin-functions.php'
 patching file 'wp-admin/admin-header.php'
 patching file 'wp-admin/custom-background.php'
 patching file 'wp-admin/custom-header.php'
 patching file 'wp-admin/includes/admin-filters.php'
 patching file 'wp-admin/includes/admin.php'
 patching file 'wp-admin/includes/class-wp-upgrader-skins.php'
 patching file 'wp-admin/includes/continents-cities.php'
 patching file 'wp-admin/includes/edit-tag-messages.php'
 patching file 'wp-admin/includes/file.php'
 patching file 'wp-admin/includes/menu.php'
 patching file 'wp-admin/includes/ms-admin-filters.php'
 patching file 'wp-admin/menu-header.php'
 patching file 'wp-admin/menu.php'
 patching file 'wp-admin/network/menu.php'
 patching file 'wp-admin/options-head.php'
 patching file 'wp-admin/upgrade-functions.php'
 patching file 'wp-admin/user/menu.php'
 patching file 'wp-content/plugins/hello.php'
 patching file 'wp-content/themes/twentytwentyfive/functions.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/banner-about-
 book.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/banner-cover-
 big-heading.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/banner-intro-
 image.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/banner-
 intro.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/banner-
 poster.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/banner-with-
 description-and-images-grid.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/comments.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/contact-
 centered-social-link.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/contact-info-
 locations.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/contact-
 location-and-link.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/cta-book-
 links.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/cta-book-
 locations.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/cta-centered-
 heading.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/cta-events-
 list.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/cta-grid-
 products-link.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/cta-heading-
 search.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/cta-
 newsletter.php'
 patching file 'wp-
 content/themes/twentytwentyfive/patterns/event-3-col.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/event-rsvp.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/event-
 schedule.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/footer-
 centered.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/footer-
 columns.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/footer-
 newsletter.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/footer-
 social.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/footer.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/format-
 audio.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/format-
 link.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/grid-
 videos.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/grid-with-
 categories.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/heading-and-
 paragraph-with-image.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/hero-book.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/hero-full-
 width-image.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/hero-
 overlapped-book-cover-with-links.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/hero-
 podcast.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/hidden-404.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/hidden-blog-
 heading.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/hidden-
 search.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/hidden-
 sidebar.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/hidden-written-
 by.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/logos.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/media-
 instagram-grid.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/more-posts.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/overlapped-
 images.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/page-coming-
 soon.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/page-cv-
 bio.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/page-link-in-
 bio-heading-paragraph-links-image.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/page-link-in-
 bio-wide-margins.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/page-link-in-
 bio-with-tight-margins.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/page-portfolio-
 home.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/post-
 navigation.php'
 patching file 'wp-
 content/themes/twentytwentyfive/patterns/pricing-2-col.php'
 patching file 'wp-
 content/themes/twentytwentyfive/patterns/pricing-3-col.php'
 patching file 'wp-
 content/themes/twentytwentyfive/patterns/services-3-col.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/services-
 subscriber-only-section.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/services-team-
 photos.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/template-home-
 news-blog.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/template-home-
 photo-blog.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/template-home-
 posts-grid-news-blog.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/template-home-
 text-blog.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/template-home-
 with-sidebar-news-blog.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/template-query-
 loop-news-blog.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/template-query-
 loop-photo-blog.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/template-query-
 loop-text-blog.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/template-query-
 loop-vertical-header-blog.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/template-query-
 loop.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/template-
 single-left-aligned-content.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/template-
 single-news-blog.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/template-
 single-offset.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/template-
 single-photo-blog.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/template-
 single-text-blog.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/template-
 single-vertical-header-blog.php'
 patching file 'wp-
 content/themes/twentytwentyfive/patterns/testimonials-2-col.php'
 patching file 'wp-
 content/themes/twentytwentyfive/patterns/testimonials-6-col.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/testimonials-
 large.php'
 patching file 'wp-content/themes/twentytwentyfive/patterns/text-faqs.php'
 patching file 'wp-content/themes/twentytwentyfour/functions.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/banner-
 hero.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/banner-project-
 description.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/cta-content-
 image-on-right.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/cta-
 pricing.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/cta-rsvp.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/cta-services-
 image-left.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/cta-subscribe-
 centered.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/footer-
 centered-logo-nav.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/footer-
 colophon-3-col.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/footer.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/gallery-full-
 screen-image.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/gallery-
 project-layout.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/hidden-404.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/hidden-
 comments.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/hidden-no-
 results.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/hidden-
 portfolio-hero.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/hidden-post-
 meta.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/hidden-post-
 navigation.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/hidden-posts-
 heading.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/hidden-
 search.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/hidden-
 sidebar.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/page-
 newsletter-landing.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/page-rsvp-
 landing.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/posts-
 grid-2-col.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/posts-list.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/team-4-col.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/template-index-
 blogging.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/template-index-
 portfolio.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/testimonial-
 centered.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/text-
 alternating-images.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/text-centered-
 statement-small.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/text-centered-
 statement.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/text-faq.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/text-feature-
 grid-3-col.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/text-project-
 details.php'
 patching file 'wp-content/themes/twentytwentyfour/patterns/text-title-
 left-image-right.php'
 patching file 'wp-content/themes/twentytwentythree/patterns/call-to-
 action.php'
 patching file 'wp-content/themes/twentytwentythree/patterns/footer-
 default.php'
 patching file 'wp-
 content/themes/twentytwentythree/patterns/hidden-404.php'
 patching file 'wp-content/themes/twentytwentythree/patterns/hidden-
 comments.php'
 patching file 'wp-content/themes/twentytwentythree/patterns/hidden-
 heading.php'
 patching file 'wp-content/themes/twentytwentythree/patterns/hidden-no-
 results.php'
 patching file 'wp-content/themes/twentytwentythree/patterns/post-meta.php'
 patching file 'wp-includes/block-bindings/pattern-overrides.php'
 patching file 'wp-includes/block-bindings/post-meta.php'
 patching file 'wp-includes/block-patterns/query-grid-posts.php'
 patching file 'wp-includes/block-patterns/query-large-title-posts.php'
 patching file 'wp-includes/block-patterns/query-medium-posts.php'
 patching file 'wp-includes/block-patterns/query-offset-posts.php'
 patching file 'wp-includes/block-patterns/query-small-posts.php'
 patching file 'wp-includes/block-patterns/query-standard-posts.php'
 patching file 'wp-includes/block-patterns/social-links-shared-background-
 color.php'
 patching file 'wp-includes/block-patterns.php'
 patching file 'wp-includes/block-supports/dimensions.php'
 patching file 'wp-includes/block-supports/elements.php'
 patching file 'wp-includes/block-supports/layout.php'
 patching file 'wp-includes/block-supports/settings.php'
 patching file 'wp-includes/blocks/archives.php'
 patching file 'wp-includes/blocks/avatar.php'
 patching file 'wp-includes/blocks/block.php'
 patching file 'wp-includes/blocks/button.php'
 patching file 'wp-includes/blocks/calendar.php'
 patching file 'wp-includes/blocks/categories.php'
 patching file 'wp-includes/blocks/comment-author-name.php'
 patching file 'wp-includes/blocks/comment-content.php'
 patching file 'wp-includes/blocks/comment-date.php'
 patching file 'wp-includes/blocks/comment-edit-link.php'
 patching file 'wp-includes/blocks/comment-reply-link.php'
 patching file 'wp-includes/blocks/comment-template.php'
 patching file 'wp-includes/blocks/comments-pagination-next.php'
 patching file 'wp-includes/blocks/comments-pagination-numbers.php'
 patching file 'wp-includes/blocks/comments-pagination-previous.php'
 patching file 'wp-includes/blocks/comments-pagination.php'
 patching file 'wp-includes/blocks/comments-title.php'
 patching file 'wp-includes/blocks/comments.php'
 patching file 'wp-includes/blocks/cover.php'
 patching file 'wp-includes/blocks/file.php'
 patching file 'wp-includes/blocks/footnotes.php'
 patching file 'wp-includes/blocks/gallery.php'
 patching file 'wp-includes/blocks/heading.php'
 patching file 'wp-includes/blocks/home-link.php'
 patching file 'wp-includes/blocks/image.php'
 patching file 'wp-includes/blocks/latest-comments.php'
 patching file 'wp-includes/blocks/latest-posts.php'
 patching file 'wp-includes/blocks/legacy-widget.php'
 patching file 'wp-includes/blocks/list.php'
 patching file 'wp-includes/blocks/loginout.php'
 patching file 'wp-includes/blocks/media-text.php'
 patching file 'wp-includes/blocks/navigation-link.php'
 patching file 'wp-includes/blocks/navigation-submenu.php'
 patching file 'wp-includes/blocks/navigation.php'
 patching file 'wp-includes/blocks/page-list-item.php'
 patching file 'wp-includes/blocks/page-list.php'
 patching file 'wp-includes/blocks/pattern.php'
 patching file 'wp-includes/blocks/post-author-biography.php'
 patching file 'wp-includes/blocks/post-author-name.php'
 patching file 'wp-includes/blocks/post-author.php'
 patching file 'wp-includes/blocks/post-comments-form.php'
 patching file 'wp-includes/blocks/post-content.php'
 patching file 'wp-includes/blocks/post-date.php'
 patching file 'wp-includes/blocks/post-excerpt.php'
 patching file 'wp-includes/blocks/post-featured-image.php'
 patching file 'wp-includes/blocks/post-navigation-link.php'
 patching file 'wp-includes/blocks/post-template.php'
 patching file 'wp-includes/blocks/post-terms.php'
 patching file 'wp-includes/blocks/post-title.php'
 patching file 'wp-includes/blocks/query-no-results.php'
 patching file 'wp-includes/blocks/query-pagination-next.php'
 patching file 'wp-includes/blocks/query-pagination-numbers.php'
 patching file 'wp-includes/blocks/query-pagination-previous.php'
 patching file 'wp-includes/blocks/query-pagination.php'
 patching file 'wp-includes/blocks/query-title.php'
 patching file 'wp-includes/blocks/query.php'
 patching file 'wp-includes/blocks/read-more.php'
 patching file 'wp-includes/blocks/rss.php'
 patching file 'wp-includes/blocks/search.php'
 patching file 'wp-includes/blocks/shortcode.php'
 patching file 'wp-includes/blocks/site-logo.php'
 patching file 'wp-includes/blocks/site-tagline.php'
 patching file 'wp-includes/blocks/site-title.php'
 patching file 'wp-includes/blocks/social-link.php'
 patching file 'wp-includes/blocks/tag-cloud.php'
 patching file 'wp-includes/blocks/template-part.php'
 patching file 'wp-includes/blocks/term-description.php'
 patching file 'wp-includes/blocks/widget-group.php'
 patching file 'wp-includes/class-feed.php'
 patching file 'wp-includes/class-http.php'
 patching file 'wp-includes/class-json.php'
 patching file 'wp-includes/class-oembed.php'
 patching file 'wp-includes/class-smtp.php'
 patching file 'wp-includes/class-snoopy.php'
 patching file 'wp-includes/class-wp-feed-cache.php'
 patching file 'wp-includes/class.wp-dependencies.php'
 patching file 'wp-includes/class.wp-scripts.php'
 patching file 'wp-includes/class.wp-styles.php'
 patching file 'wp-includes/customize/class-wp-customize-new-menu-
 control.php'
 patching file 'wp-includes/customize/class-wp-customize-new-menu-
 section.php'
 patching file 'wp-includes/date.php'
 patching file 'wp-includes/default-filters.php'
 patching file 'wp-includes/embed-template.php'
 patching file 'wp-includes/feed-atom-comments.php'
 patching file 'wp-includes/feed-atom.php'
 patching file 'wp-includes/feed-rdf.php'
 patching file 'wp-includes/feed-rss.php'
 patching file 'wp-includes/feed-rss2-comments.php'
 patching file 'wp-includes/feed-rss2.php'
 patching file 'wp-includes/locale.php'
 patching file 'wp-includes/media.php'
 patching file 'wp-includes/ms-default-filters.php'
 patching file 'wp-includes/registration-functions.php'
 patching file 'wp-includes/registration.php'
 patching file 'wp-includes/rss.php'
 patching file 'wp-includes/session.php'
 patching file 'wp-includes/spl-autoload-compat.php'
 patching file 'wp-includes/template-canvas.php'
 patching file 'wp-includes/template-loader.php'
 patching file 'wp-includes/theme-compat/comments.php'
 patching file 'wp-includes/theme-compat/embed-404.php'
 patching file 'wp-includes/theme-compat/embed-content.php'
 patching file 'wp-includes/theme-compat/embed.php'
 patching file 'wp-includes/theme-compat/footer-embed.php'
 patching file 'wp-includes/theme-compat/footer.php'
 patching file 'wp-includes/theme-compat/header-embed.php'
 patching file 'wp-includes/theme-compat/header.php'
 patching file 'wp-includes/theme-compat/sidebar.php'
 patching file 'wp-includes/update.php'
 patching file 'wp-includes/vars.php'
 $ > ~/dev/log/error_log # empty error log
 $ find . -name '*.php' | sed 's|^\./||' | xargs -I {} echo
 "http://localhost:8080/{}" > urls.txt # generate urls
 $ xargs -P 10 -n 1 curl -s -o /dev/null < urls.txt # visit each url
 $ grep "Call to undefined function" ~/dev/log/error_log | grep -o '/[^
 ]*.php' | uniq
 $ patch -p0 -R < ~/Desktop/test.patch
 $
 }}}

 That is, after applying the patch, no "Call to undefined function" errors
 are reported.

 cc @SergeyBiryukov another one for your attention, would be greatly
 appreciated :)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62724#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list