Title: PHP 8 Compatibility
Last modified: January 18, 2021

---

# PHP 8 Compatibility

 *  Resolved [ThomTra](https://wordpress.org/support/users/thomtra/)
 * (@thomtra)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-8-compatibility-6/)
 * To surpress warnings after upgrade to php 8 i removed the default value for the
   parameter $field in function get_one_by:
 * old:
    public function get_one_by( $field=’id’, $val, $return_type = OBJECT, $
   include_stats = false, $exclude_disabled=true ) {
 * new:
    public function get_one_by( $field, $val, $return_type = OBJECT, $include_stats
   = false, $exclude_disabled=true ) {
 * In PHP8 Parameters with default value should stay on the end otherwise it makes
   no sense.
 * Would like to see these change in your next update 🙂

Viewing 1 replies (of 1 total)

 *  Plugin Author [cartpauj](https://wordpress.org/support/users/cartpauj/)
 * (@cartpauj)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/php-8-compatibility-6/#post-13972474)
 * We’ll have this fixed in the next release. Thanks!

Viewing 1 replies (of 1 total)

The topic ‘PHP 8 Compatibility’ is closed to new replies.

 * ![](https://ps.w.org/pretty-link/assets/icon-256x256.png?rev=2503434)
 * [PrettyLinks - Affiliate Links, Link Branding, Link Tracking, Marketing and Stripe Payments Plugin](https://wordpress.org/plugins/pretty-link/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pretty-link/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pretty-link/)
 * [Active Topics](https://wordpress.org/support/plugin/pretty-link/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pretty-link/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pretty-link/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [cartpauj](https://wordpress.org/support/users/cartpauj/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/php-8-compatibility-6/#post-13972474)
 * Status: resolved