The wp_get_sites function was deprecated in WP 4.6. The full answer is the first answer here: Sorting list of sites from multisite network using wp_get_sites .
Also, the function provided by Lance Cleveland (in the answers in the above link) provides a test for the proper function to use. But it is incomplete, as the old function is deprecated so the old function still exists if pre-4.6. The test should look for the WP version, not the existence of the function. (See my answer to the same question.)
I have a plugin for multisites that looped through the sites. The pre-4.6 code was causing problems on 4.6+ site, so changed the plugin's requirements to require WP 4.6 or later. The plugin automatically deactivates with a message if pre-4.6 is found.
That said, keeping WP updated is strongly recommended. There are security risks (and compatibility issues) with not doing updates.
get_sites()
being called (which hook)? – Dave Romsey Nov 17 '16 at 8:11init
as i said ( version 4.6). I doubt problem is that the function is called within non MULTI-SITE site.... – T.Todua Nov 17 '16 at 8:13