Closed (fixed)
Project:
Instagram Without API (IWA)
Version:
3.0.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
19 Dec 2018 at 08:16 UTC
Updated:
5 May 2026 at 15:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
vdenis commentedComment #3
vdenis commentedComment #4
vdenis commentedComment #5
vdenis commentedI've created the patch. Basically, I've just added blockValidate where I'm checking if
$slice_variableis empty() or not.I'll be happy with someone can review and if there is something I can do better.
Comment #6
vdenis commentedComment #7
vdenis commentedRemoved debugging code and created new patch file.
Comment #8
deaom commentedI tested the patch and it works as designed, the one thing that I noticed is, that when the error msg appears, the wrong profile name is displayed. It displayes the last saved one.
Change this line of code
to this:
And you should get the correct name of the profile in the error msg.
Comment #9
vdenis commentedThanks for the review. Issue fixed.
Comment #10
vdenis commentedComment #11
vdenis commentedProviding new patch, because latest had some issue with applying.
Comment #12
deaom commentedThe patch works as designed.
BR,
Dea
Comment #13
boshtian commentedThere are some coding standard issues in blockValidation function.
Also, I would suggest giving the part of code that parses instagram response into json in a separate service, to avoid code duplication.
Comment #14
vdenis commentedAttaching a new patch in which I've fixed coding standards and moved the part of the code to the service as suggested by @boshtian.
Comment #15
vdenis commentedComment #16
deaom commentedThis patch applies and works. The only problem is, when you enter the username of a profile that does not exist/is deleted, you get an error. But that is beeing handled here #3022821: Check if Instagram username is valid.
Comment #17
ipwa commentedTargeting correct branch now that branches have been fixed.
Comment #19
ipwa commentedAlso added check if profile exists. Could not use any patches because the way the data is fetched was refactored. Thanks everyone!