You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wenn das Projekt schon die Session per session_start(); gestartet hat, dann kommt eine Notice Meldung, weil in /Immobilienscout/Rest.php in Zeile 2 die Session erneut gestartet wird.
Notice: A session had already been started - ignoring session_start()
in vendor/immocaster/php-sdk/Immocaster/Immobilienscout/Rest.php at line 2
Es ist zwar nur eine Notice, aber bitte beheben ... oder ein Workaround vorschlagen :)
The text was updated successfully, but these errors were encountered:
This makes it impossible to use this API with any existing framework, as they do their own session management, which breaks if this library just globally starts the session.
There might be a way to integrate this with WordPress.
I think this code snippet helps: function register_session(){ if( !session_id() ) session_start(); } add_action('init','register_session');
Just tested it in a flat WP installation where I integrated this API as a plugin. With this code in the main plugin file, I don't get any "headers already sent" messages and the API returns region data, all properties for an account, and the other demo function calls seem to work as well.
Without the snippet I do get the warnings - API works too though.
Not sure how this affects compatibility to other plugins with session handling!
Wenn das Projekt schon die Session per
session_start();
gestartet hat, dann kommt eine Notice Meldung, weil in/Immobilienscout/Rest.php
in Zeile 2 die Session erneut gestartet wird.Es ist zwar nur eine Notice, aber bitte beheben ... oder ein Workaround vorschlagen :)
The text was updated successfully, but these errors were encountered: