Bug Report: empty data
-
Issue found: The link to buy a ticket in the events overview list was empty like so:
<a href="" class="tribe-events-c-small-cta__link tribe-common-cta tribe-common-cta--thin-alt"></a>I traced this back to /event-tickets/src/Tribe/Events/Views/V2/Models/Tickets.php around line 177
if ( null !== $this->data ) {This is incorrect, as $this->data is an empty array, which isn’t the same as a null
if ( ! empty( $this->data ) ) {is the correct fix, and will force the data to be generated. After applying the fix, the “buy” link was correctly populated.
Here is the revised code block which contains the fix:
// if ( null !== $this->data ) {
if ( ! empty( $this->data ) ) {
return $this->data;
}To recap, on the site I was working, $this->data reported as an empty array. Applying the above fix forced the data to be generated and the site is working correctly.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Bug Report: empty data’ is closed to new replies.